Class: StrawberryAPI::Collection

Inherits:
Object
  • Object
show all
Defined in:
lib/strawberry_api/collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id



5
6
7
# File 'lib/strawberry_api/collection.rb', line 5

def id
  @id
end

#nameObject

Returns the value of attribute name



7
8
9
# File 'lib/strawberry_api/collection.rb', line 7

def name
  @name
end

#user_idObject

Returns the value of attribute user_id



6
7
8
# File 'lib/strawberry_api/collection.rb', line 6

def user_id
  @user_id
end