Class: Incandescent::Host

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/incandescent/host.rb', line 3

def name
  @name
end

#pagesObject (readonly)

Returns the value of attribute pages.



3
4
5
# File 'lib/incandescent/host.rb', line 3

def pages
  @pages
end