Class: RMC::Item::Task
- Inherits:
-
Object
- Object
- RMC::Item::Task
- Defined in:
- lib/rmc/item/task.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(connection, data) ⇒ Task
constructor
A new instance of Task.
Constructor Details
#initialize(connection, data) ⇒ Task
Returns a new instance of Task.
11 12 13 14 15 16 |
# File 'lib/rmc/item/task.rb', line 11 def initialize(connection, data) @connection = connection @id = data['id'] @name = data['name'] end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
6 7 8 |
# File 'lib/rmc/item/task.rb', line 6 def connection @connection end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/rmc/item/task.rb', line 8 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/rmc/item/task.rb', line 9 def name @name end |
Instance Method Details
#delete ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/rmc/item/task.rb', line 18 def delete @connection.version = 1 @connection.request( :url => "/tasks/#{@id}", :method => :delete, ) end |