Module: Claire::Client::Listable
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.children ⇒ Object
Lists all avaliable Claire::Items.
-
.included(base) ⇒ Object
Extends the class methods above.
Class Method Details
.children ⇒ Object
Lists all avaliable Claire::Items
31 32 33 |
# File 'lib/claire_client/listable.rb', line 31 def self.children @@children ||= [] end |
.included(base) ⇒ Object
Extends the class methods above.
24 25 26 27 28 |
# File 'lib/claire_client/listable.rb', line 24 def Listable.included base raise Error, "only Claire::Client::Item s can be Listable" unless Item.children.include? base base.extend ClassMethods (@@children ||= []) << base end |