Class: Epubify::Shelf

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

Instance Method Summary collapse

Constructor Details

#initializeShelf

Returns a new instance of Shelf.



80
81
82
# File 'lib/shelf.rb', line 80

def initialize
  @items = nil
end

Instance Method Details

#itemsObject



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