Class: Incandescent::Page
- Inherits:
-
Object
- Object
- Incandescent::Page
- Defined in:
- lib/incandescent/page.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#iid ⇒ Object
readonly
Returns the value of attribute iid.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#usage_height ⇒ Object
readonly
Returns the value of attribute usage_height.
-
#usage_image ⇒ Object
readonly
Returns the value of attribute usage_image.
-
#usage_width ⇒ Object
readonly
Returns the value of attribute usage_width.
Instance Method Summary collapse
-
#initialize(json_info) ⇒ Page
constructor
A new instance of Page.
Constructor Details
#initialize(json_info) ⇒ Page
Returns a new instance of Page.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/incandescent/page.rb', line 5 def initialize(json_info) index, page_info = json_info @page = page_info["page"] @source = page_info["source"] @date = page_info["date"] @usage_image = page_info["usage-image"] @usage_height = page_info["usage-height"] @usage_width = page_info["usage-width"] @image = page_info["image"] @iid = page_info["id"] end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
3 4 5 |
# File 'lib/incandescent/page.rb', line 3 def date @date end |
#iid ⇒ Object (readonly)
Returns the value of attribute iid.
3 4 5 |
# File 'lib/incandescent/page.rb', line 3 def iid @iid end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
3 4 5 |
# File 'lib/incandescent/page.rb', line 3 def image @image end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
3 4 5 |
# File 'lib/incandescent/page.rb', line 3 def page @page end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
3 4 5 |
# File 'lib/incandescent/page.rb', line 3 def source @source end |
#usage_height ⇒ Object (readonly)
Returns the value of attribute usage_height.
3 4 5 |
# File 'lib/incandescent/page.rb', line 3 def usage_height @usage_height end |
#usage_image ⇒ Object (readonly)
Returns the value of attribute usage_image.
3 4 5 |
# File 'lib/incandescent/page.rb', line 3 def usage_image @usage_image end |
#usage_width ⇒ Object (readonly)
Returns the value of attribute usage_width.
3 4 5 |
# File 'lib/incandescent/page.rb', line 3 def usage_width @usage_width end |