Class: Epubify::Shelf
- Inherits:
-
Object
- Object
- Epubify::Shelf
- Defined in:
- lib/shelf.rb
Instance Method Summary collapse
-
#initialize ⇒ Shelf
constructor
A new instance of Shelf.
- #items ⇒ Object
Constructor Details
#initialize ⇒ Shelf
Returns a new instance of Shelf.
80 81 82 |
# File 'lib/shelf.rb', line 80 def initialize @items = nil end |
Instance Method Details
#items ⇒ Object
85 86 87 88 89 90 91 92 93 94 |
# File 'lib/shelf.rb', line 85 def items unless @items res = ShelfApi.items @items = [] res["items"].each do |hash| @items << Item.new(hash) end end @items end |