Class: Group

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Serializers::JSON, ActiveModel::Serializers::Xml
Defined in:
lib/generators/resty/setup/templates/group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Group

Returns a new instance of Group.



7
8
9
# File 'lib/generators/resty/setup/templates/group.rb', line 7

def initialize(attributes = {})
  @name = attributes['name']
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/generators/resty/setup/templates/group.rb', line 5

def name
  @name
end

Instance Method Details

#attributesObject



11
12
13
# File 'lib/generators/resty/setup/templates/group.rb', line 11

def attributes
  { 'name' => name }
end