Class: STDDAPI::Customer
- Inherits:
-
Object
- Object
- STDDAPI::Customer
- Defined in:
- lib/stdd_api.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Customer
constructor
A new instance of Customer.
- #to_json ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ Customer
Returns a new instance of Customer.
94 95 96 |
# File 'lib/stdd_api.rb', line 94 def initialize(name) @name = name end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
97 98 99 |
# File 'lib/stdd_api.rb', line 97 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
97 98 99 |
# File 'lib/stdd_api.rb', line 97 def name @name end |
Instance Method Details
#to_json ⇒ Object
101 102 103 |
# File 'lib/stdd_api.rb', line 101 def to_json {'name' => @name}.to_json end |
#to_s ⇒ Object
98 99 100 |
# File 'lib/stdd_api.rb', line 98 def to_s "name: #{@name}, id: #{@id}" end |