Class: Application
- Inherits:
-
Object
- Object
- Application
- Includes:
- ActiveModel::Serializers::JSON, ActiveModel::Serializers::Xml
- Defined in:
- lib/generators/resty/setup/templates/application.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(attributes = {}) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(attributes = {}) ⇒ Application
Returns a new instance of Application.
7 8 9 10 |
# File 'lib/generators/resty/setup/templates/application.rb', line 7 def initialize(attributes = {}) @name = attributes['name'] @url = attributes['url'] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/generators/resty/setup/templates/application.rb', line 5 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/generators/resty/setup/templates/application.rb', line 5 def url @url end |
Instance Method Details
#attributes ⇒ Object
12 13 14 |
# File 'lib/generators/resty/setup/templates/application.rb', line 12 def attributes { 'name' => name, 'url' => url } end |