Class: TwicasStream::TwicasApiObject::SubCategory
- Inherits:
-
Object
- Object
- TwicasStream::TwicasApiObject::SubCategory
- Defined in:
- lib/twicas_stream/twicas_api_object/sub_category.rb
Instance Attribute Summary collapse
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
Instance Method Summary collapse
-
#initialize(elements = []) ⇒ SubCategory
constructor
A new instance of SubCategory.
Constructor Details
#initialize(elements = []) ⇒ SubCategory
Returns a new instance of SubCategory.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/twicas_stream/twicas_api_object/sub_category.rb', line 9 def initialize elements = [] @objects = Array.new elements.each{ |element| object = { :id => element['id'], :name => element['name'], :count => element['count'] } @objects.push object } end |
Instance Attribute Details
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
7 8 9 |
# File 'lib/twicas_stream/twicas_api_object/sub_category.rb', line 7 def objects @objects end |