Class: Incandescent::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/incandescent/page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_info) ⇒ Page

Returns a new instance of Page.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/incandescent/page.rb', line 7

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["iid"]
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



5
6
7
# File 'lib/incandescent/page.rb', line 5

def date
  @date
end

#iidObject (readonly)

Returns the value of attribute iid.



5
6
7
# File 'lib/incandescent/page.rb', line 5

def iid
  @iid
end

#imageObject (readonly)

Returns the value of attribute image.



5
6
7
# File 'lib/incandescent/page.rb', line 5

def image
  @image
end

#pageObject (readonly)

Returns the value of attribute page.



5
6
7
# File 'lib/incandescent/page.rb', line 5

def page
  @page
end

#sourceObject (readonly)

Returns the value of attribute source.



5
6
7
# File 'lib/incandescent/page.rb', line 5

def source
  @source
end

#usage_heightObject (readonly)

Returns the value of attribute usage_height.



5
6
7
# File 'lib/incandescent/page.rb', line 5

def usage_height
  @usage_height
end

#usage_imageObject (readonly)

Returns the value of attribute usage_image.



5
6
7
# File 'lib/incandescent/page.rb', line 5

def usage_image
  @usage_image
end

#usage_widthObject (readonly)

Returns the value of attribute usage_width.



5
6
7
# File 'lib/incandescent/page.rb', line 5

def usage_width
  @usage_width
end