Class: Semaph::Shells::Organisations::OrganisationsShell
- Inherits:
-
Object
- Object
- Semaph::Shells::Organisations::OrganisationsShell
- Includes:
- ShellShock::Context
- Defined in:
- lib/semaph/shells/organisations/organisations_shell.rb
Instance Method Summary collapse
-
#initialize(organisations) ⇒ OrganisationsShell
constructor
A new instance of OrganisationsShell.
Constructor Details
#initialize(organisations) ⇒ OrganisationsShell
Returns a new instance of OrganisationsShell.
12 13 14 15 16 17 18 19 20 |
# File 'lib/semaph/shells/organisations/organisations_shell.rb', line 12 def initialize(organisations) @organisations = organisations @prompt = "🏗 > " organisations_list_command = OrganisationsListCommand.new(organisations) add_command organisations_list_command, "list-organisations", "ls" add_command OrganisationsSelectCommand.new(organisations), "select-organisation", "cd" add_command ::Semaph::Commands::ReloadCommand.new, "reload" if ENV["SEMAPH_RELOAD"] organisations_list_command.execute("") end |