Class: STDDAPI::Objects::Project
- Inherits:
-
Object
- Object
- STDDAPI::Objects::Project
- Defined in:
- lib/objects.rb
Instance Attribute Summary collapse
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(customer_id, name) ⇒ Project
constructor
A new instance of Project.
- #to_json ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(customer_id, name) ⇒ Project
Returns a new instance of Project.
17 18 19 20 |
# File 'lib/objects.rb', line 17 def initialize(customer_id,name) @name = name @customer_id = customer_id end |
Instance Attribute Details
#customer_id ⇒ Object
Returns the value of attribute customer_id.
21 22 23 |
# File 'lib/objects.rb', line 21 def customer_id @customer_id end |
#id ⇒ Object
Returns the value of attribute id.
21 22 23 |
# File 'lib/objects.rb', line 21 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/objects.rb', line 21 def name @name end |
Instance Method Details
#to_json ⇒ Object
25 26 27 |
# File 'lib/objects.rb', line 25 def to_json {'name' => @name,'customer_id' => customer_id}.to_json end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/objects.rb', line 22 def to_s "name: #{@name}, customer_id: #{@customer_id}, id: #{@id}" end |