Class: Troo::Commands::Default
- Inherits:
-
Object
- Object
- Troo::Commands::Default
- Defined in:
- lib/troo/cli/commands/default.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(klass, id) ⇒ Object
constructor
[].
-
#set_default ⇒ Object
[].
Constructor Details
#initialize(klass, id) ⇒ Object
Returns [].
16 17 18 |
# File 'lib/troo/cli/commands/default.rb', line 16 def initialize(klass, id) @klass, @id = klass, id end |
Class Method Details
.dispatch(klass, id) ⇒ Object
Returns [].
8 9 10 |
# File 'lib/troo/cli/commands/default.rb', line 8 def dispatch(klass, id) new(klass, id).set_default end |
Instance Method Details
#set_default ⇒ Object
Returns [].
21 22 23 24 |
# File 'lib/troo/cli/commands/default.rb', line 21 def set_default return success if resource && resource.set_default! error end |