Class: Zvent::Category
Overview
An object that represents a single venue from zvents
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pid ⇒ Object
Returns the value of attribute pid.
Instance Method Summary collapse
-
#initialize(category_hash) ⇒ Category
constructor
A new instance of Category.
Methods inherited from Base
Constructor Details
#initialize(category_hash) ⇒ Category
Returns a new instance of Category.
6 7 8 9 10 11 12 |
# File 'lib/zvent/category.rb', line 6 def initialize(category_hash) begin category_hash.each_pair{|key, value| self.send("#{key}=", value) } rescue NoMethodError => e # Do nothing! end end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
4 5 6 |
# File 'lib/zvent/category.rb', line 4 def count @count end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/zvent/category.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/zvent/category.rb', line 4 def name @name end |
#pid ⇒ Object
Returns the value of attribute pid.
4 5 6 |
# File 'lib/zvent/category.rb', line 4 def pid @pid end |