Class: BuildTool::Commands::Environments::Set

Inherits:
Standard
  • Object
show all
Defined in:
lib/build-tool/commands/environments/set.rb

Overview

BuildCommand

Instance Attribute Summary

Attributes inherited from Base

#cmd, #options, #parent

Instance Method Summary collapse

Methods inherited from Standard

#complete_modules, #initialize, #log_directory, #while_logging_to

Methods inherited from Base

#<=>, #applicable?, #cleanup_after_vcs_access, #complete, #complete_arguments, #complete_readline_1_8, #complete_readline_1_9, #configuration, #do_complete_1_8, #do_complete_1_9, #each_option, #execute, #fullname, #initialize, #log?, #say, #setup_command, #show_help, #skip_command, #summarize, #teardown_command, #usage

Methods included from HelpText

#cmdalias, #description, included, #long_description, #name

Constructor Details

This class inherits a constructor from BuildTool::Commands::Standard

Instance Method Details

#do_execute(args) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/build-tool/commands/environments/set.rb', line 14

def do_execute( args )
    case args.length
    when 0
        return usage( "Not enough arguments." )
    when 1
        # OK
    else
        return usage( "To many arguments." )
    end

    # Get the environment.
    env = configuration.environment(args[0])
    return env.shell
end

#initialize_optionsObject



29
30
31
32
# File 'lib/build-tool/commands/environments/set.rb', line 29

def initialize_options
    @options.banner = "Usage: #{Pathname.new($0).basename} #{self.fullname} MODULE"
    super
end