Class: Incandescent::Host
- Inherits:
-
Object
- Object
- Incandescent::Host
- Defined in:
- lib/incandescent/host.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
Instance Method Summary collapse
-
#initialize(json_info) ⇒ Host
constructor
A new instance of Host.
Constructor Details
#initialize(json_info) ⇒ Host
Returns a new instance of Host.
5 6 7 8 9 10 11 |
# File 'lib/incandescent/host.rb', line 5 def initialize(json_info) @name = json_info.shift @pages = [] json_info.first["pages"].each do |page_info| @pages << Incandescent::Page.new(page_info) end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/incandescent/host.rb', line 3 def name @name end |
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
3 4 5 |
# File 'lib/incandescent/host.rb', line 3 def pages @pages end |