Class: Wikidotrb::Module::PageRevision
- Inherits:
-
Object
- Object
- Wikidotrb::Module::PageRevision
- Defined in:
- lib/wikidotrb/module/page_revision.rb
Instance Attribute Summary collapse
-
#comment
Returns the value of attribute comment.
-
#created_at
Returns the value of attribute created_at.
-
#created_by
Returns the value of attribute created_by.
-
#html ⇒ String
HTML getter method Retrieve HTML if not already retrieved.
-
#id
Returns the value of attribute id.
-
#page
Returns the value of attribute page.
-
#rev_no
Returns the value of attribute rev_no.
-
#source ⇒ PageSource
Source getter method Retrieve source if not already retrieved.
Instance Method Summary collapse
-
#html_acquired? ⇒ Boolean
Check if HTML has been retrieved.
-
#initialize(page:, id:, rev_no:, created_by:, created_at:, comment:, source: nil, html: nil) ⇒ PageRevision
constructor
Initialization method.
-
#source_acquired? ⇒ Boolean
Check if source has been retrieved.
Constructor Details
#initialize(page:, id:, rev_no:, created_by:, created_at:, comment:, source: nil, html: nil) ⇒ PageRevision
Initialization method
98 99 100 101 102 103 104 105 106 107 |
# File 'lib/wikidotrb/module/page_revision.rb', line 98 def initialize(page:, id:, rev_no:, created_by:, created_at:, comment:, source: nil, html: nil) @page = page @id = id @rev_no = rev_no @created_by = created_by @created_at = created_at @comment = comment @source = source @html = html end |
Instance Attribute Details
#comment
Returns the value of attribute comment.
87 88 89 |
# File 'lib/wikidotrb/module/page_revision.rb', line 87 def comment @comment end |
#created_at
Returns the value of attribute created_at.
87 88 89 |
# File 'lib/wikidotrb/module/page_revision.rb', line 87 def created_at @created_at end |
#created_by
Returns the value of attribute created_by.
87 88 89 |
# File 'lib/wikidotrb/module/page_revision.rb', line 87 def created_by @created_by end |
#html ⇒ String
HTML getter method Retrieve HTML if not already retrieved
134 135 136 |
# File 'lib/wikidotrb/module/page_revision.rb', line 134 def html @html end |
#id
Returns the value of attribute id.
87 88 89 |
# File 'lib/wikidotrb/module/page_revision.rb', line 87 def id @id end |
#page
Returns the value of attribute page.
87 88 89 |
# File 'lib/wikidotrb/module/page_revision.rb', line 87 def page @page end |
#rev_no
Returns the value of attribute rev_no.
87 88 89 |
# File 'lib/wikidotrb/module/page_revision.rb', line 87 def rev_no @rev_no end |
#source ⇒ PageSource
Source getter method Retrieve source if not already retrieved
124 125 126 |
# File 'lib/wikidotrb/module/page_revision.rb', line 124 def source @source end |
Instance Method Details
#html_acquired? ⇒ Boolean
Check if HTML has been retrieved
117 118 119 |
# File 'lib/wikidotrb/module/page_revision.rb', line 117 def html_acquired? !@html.nil? end |
#source_acquired? ⇒ Boolean
Check if source has been retrieved
111 112 113 |
# File 'lib/wikidotrb/module/page_revision.rb', line 111 def source_acquired? !@source.nil? end |