Class: Group
- Inherits:
-
Object
- Object
- Group
- Includes:
- ActiveModel::Serializers::JSON, ActiveModel::Serializers::Xml
- Defined in:
- lib/generators/resty/setup/templates/group.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(attributes = {}) ⇒ Group
constructor
A new instance of Group.
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
#name ⇒ Object
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
#attributes ⇒ Object
11 12 13 |
# File 'lib/generators/resty/setup/templates/group.rb', line 11 def attributes { 'name' => name } end |