Class: ApiSketch::Model::Base
- Inherits:
-
Object
- Object
- ApiSketch::Model::Base
- Defined in:
- lib/api_sketch/model/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(attributes = {}) ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 10 |
# File 'lib/api_sketch/model/base.rb', line 5 def initialize(attributes = {}) attributes = default_values_hash.merge(attributes) attributes.each do |attribute, value| self.send("#{attribute}=", value) end end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/api_sketch/model/base.rb', line 3 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/api_sketch/model/base.rb', line 3 def name @name end |