Class: Xezat::Command::Debug
- Inherits:
-
Object
- Object
- Xezat::Command::Debug
- Defined in:
- lib/xezat/command/debug.rb
Overview
変数を表示する
Instance Method Summary collapse
- #execute(c, args, options) ⇒ Object
-
#initialize(program) ⇒ Debug
constructor
A new instance of Debug.
Constructor Details
#initialize(program) ⇒ Debug
Returns a new instance of Debug.
9 10 11 12 13 14 15 16 17 |
# File 'lib/xezat/command/debug.rb', line 9 def initialize(program) program.command(:debug) do |c| c.syntax 'debug cygport' c.description 'show cygport variables' c.action do |args, | execute(c, args, ) end end end |
Instance Method Details
#execute(c, args, options) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/xezat/command/debug.rb', line 21 def execute(c, args, ) cygport = args.shift raise ArgumentError, 'wrong number of arguments (0 for 1)' unless cygport c.logger.info "ignore extra arguments: #{args.to_s}" unless args.empty? pp VariableManager::get_default_variables(cygport) end |