Class: Hondana::Shelf

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Shelf

Returns a new instance of Shelf.



44
45
46
47
48
49
# File 'lib/hondana.rb', line 44

def initialize(name)
  data = JSON.parse(Hondana.http_get("/shelfinfo?shelf=#{name}"))
  @name = name
  @url = data['url']
  @description = data['description']
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



51
52
53
# File 'lib/hondana.rb', line 51

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



50
51
52
# File 'lib/hondana.rb', line 50

def name
  @name
end

#urlObject (readonly)

Returns the value of attribute url.



52
53
54
# File 'lib/hondana.rb', line 52

def url
  @url
end