Class: Mu::Command
- Inherits:
-
Object
- Object
- Mu::Command
- Includes:
- Helper
- Defined in:
- lib/mu/command.rb,
lib/mu/command/api.rb,
lib/mu/command/curl.rb,
lib/mu/command/help.rb,
lib/mu/command/cmd_ddt.rb,
lib/mu/command/cmd_musl.rb,
lib/mu/command/cmd_muapi.rb,
lib/mu/command/cmd_scale.rb,
lib/mu/command/cmd_system.rb,
lib/mu/command/cmd_homepage.rb,
lib/mu/command/cmd_runscale.rb,
lib/mu/command/cmd_netconfig.rb,
lib/mu/command/cmd_runverify.rb,
lib/mu/command/cmd_runanalysis.rb,
lib/mu/command/cmd_runscenario.rb
Direct Known Subclasses
API, Cmd_ddt, Cmd_homepage, Cmd_muapi, Cmd_musl, Cmd_netconfig, Cmd_runanalysis, Cmd_runscale, Cmd_runscenario, Cmd_runverify, Cmd_scale, Cmd_system, Curl, Help
Defined Under Namespace
Classes: API, Cmd_ddt, Cmd_homepage, Cmd_muapi, Cmd_musl, Cmd_netconfig, Cmd_runanalysis, Cmd_runscale, Cmd_runscenario, Cmd_runverify, Cmd_scale, Cmd_system, Curl, Help
Constant Summary collapse
- Api =
API
- @@mu_ip =
ENV['MU_IP']
- @@mu_admin_user =
ENV['MU_ADMIN_USER']
- @@mu_admin_pass =
ENV['MU_ADMIN_PASS']
Constants included from Helper
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize ⇒ Command
constructor
A new instance of Command.
Methods included from Helper
#ask, #bin2hex, #error, #escape, #format_float, #get_file_as_string_array, #make_xml, #msg, #shift, #to_boolean
Constructor Details
#initialize ⇒ Command
Returns a new instance of Command.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mu/command.rb', line 26 def initialize # Set defaults @options = OpenStruct.new @options.verbose = false @options.mu_string = false # TO DO - add additional defaults @opts = OptionParser.new @opts.on('-V', '--verbose') { @options.verbose = true } end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
24 25 26 |
# File 'lib/mu/command.rb', line 24 def @options end |
#opts ⇒ Object
Returns the value of attribute opts.
24 25 26 |
# File 'lib/mu/command.rb', line 24 def opts @opts end |