Class: FluidCLI::Commands::Switch
- Inherits:
-
FluidCLI::Command
- Object
- CLI::Kit::BaseCommand
- FluidCLI::Command
- FluidCLI::Commands::Switch
- Defined in:
- lib/fluid_cli/commands/switch.rb
Instance Attribute Summary
Attributes inherited from FluidCLI::Command
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from FluidCLI::Command
call, call_help, #initialize, options, subcommand, subcommand_registry
Constructor Details
This class inherits a constructor from FluidCLI::Command
Class Method Details
.help ⇒ Object
18 19 20 |
# File 'lib/fluid_cli/commands/switch.rb', line 18 def self.help "Switches the current company context." end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/fluid_cli/commands/switch.rb', line 10 def call(*) company = FluidCLI::CompanySwitcher.new( ctx: @ctx, company: .flags[:company] ).switch @ctx.puts("Switched to company '#{company['name']}' successfully.") end |