Class: StrawberryAPI::Collection
- Inherits:
-
Object
- Object
- StrawberryAPI::Collection
- Defined in:
- lib/strawberry_api/collection.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Collection
constructor
A new instance of Collection.
Constructor Details
#initialize(params = {}) ⇒ Collection
Returns a new instance of Collection
9 10 11 12 13 |
# File 'lib/strawberry_api/collection.rb', line 9 def initialize(params = {}) params.each do |k, v| instance_variable_set("@#{k}", v) unless v.nil? end end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
5 6 7 |
# File 'lib/strawberry_api/collection.rb', line 5 def id @id end |
#name ⇒ Object
Returns the value of attribute name
7 8 9 |
# File 'lib/strawberry_api/collection.rb', line 7 def name @name end |
#user_id ⇒ Object
Returns the value of attribute user_id
6 7 8 |
# File 'lib/strawberry_api/collection.rb', line 6 def user_id @user_id end |