Class: FeedBooks::Type
Overview
Type object see feedbooks.com/api/types
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#total_books ⇒ Object
readonly
Returns the value of attribute total_books.
Class Method Summary collapse
-
.all(lim = nil) ⇒ Object
List all types known on feedbooks.
Instance Method Summary collapse
-
#books(limit = nil) ⇒ Object
all books tagged with this type.
-
#initialize(name = nil) ⇒ Type
constructor
A new instance of Type.
-
#recent_books(limit = nil) ⇒ Object
recent books tagged with this type.
-
#top_books(limit = nil) ⇒ Object
top books tagged with this type.
Methods inherited from FBobject
#connection, connection, connection=, #connection=, from_xml
Constructor Details
#initialize(name = nil) ⇒ Type
Returns a new instance of Type.
437 438 439 |
# File 'lib/ruby-feedbooks.rb', line 437 def initialize(name=nil) @name=name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
434 435 436 |
# File 'lib/ruby-feedbooks.rb', line 434 def name @name end |
#total_books ⇒ Object (readonly)
Returns the value of attribute total_books.
435 436 437 |
# File 'lib/ruby-feedbooks.rb', line 435 def total_books @total_books end |
Class Method Details
.all(lim = nil) ⇒ Object
List all types known on feedbooks
447 448 449 |
# File 'lib/ruby-feedbooks.rb', line 447 def self.all(lim=nil) generic_iterate('/types.xml',lim) end |
Instance Method Details
#books(limit = nil) ⇒ Object
all books tagged with this type
452 453 454 455 |
# File 'lib/ruby-feedbooks.rb', line 452 def books(limit=nil) FeedBooks::Book.send('generic_iterate',"/type/#{@name}/books.xml",limit) end |