Class: Troo::Commands::Add
- Inherits:
-
Object
- Object
- Troo::Commands::Add
- Defined in:
- lib/troo/cli/commands/add.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#add ⇒ Object
[].
-
#initialize(value, id = nil, options = {}) ⇒ Object
constructor
[].
Constructor Details
#initialize(value, id = nil, options = {}) ⇒ Object
Returns [].
20 21 22 |
# File 'lib/troo/cli/commands/add.rb', line 20 def initialize(value, id = nil, = {}) @value, @id, @options = value, id, end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/troo/cli/commands/add.rb', line 4 def id @id end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/troo/cli/commands/add.rb', line 4 def value @value end |
Class Method Details
.dispatch(value, id = nil, options = {}) ⇒ Object
Returns [].
11 12 13 |
# File 'lib/troo/cli/commands/add.rb', line 11 def dispatch(value, id = nil, = {}) new(value, id, ).add end |
Instance Method Details
#add ⇒ Object
Returns [].
25 26 27 28 |
# File 'lib/troo/cli/commands/add.rb', line 25 def add return success if create error end |