class Command::Arguments

Class containing processed arguments to be passed to the command

Attributes

cmd_params[RW]
show_params[R]

Public Class Methods

new(args, flags) click to toggle source
# File libs/command_tree.rb, line 205
def initialize(args, flags)
  if args.class==String
    @cmd_params=args
    @show_params=nil
  else
    raise "Unknown Argument Object type: #{args.class}" if args.class!=Array && args.class!=Hash

    @cmd_params=args
    @show_params = {}
    if args.class!=Array && (args["show"] || flags[:default_cols])
      show=args["show"] || flags[:default_cols]
      @show_params={:show=>show}
      @cmd_params.delete("show") if args["show"]
      #@cmd_params.merge!({"extendoutput"=>true})
      @cmd_params.merge!({"output"=>"extend"})
    end
  end
end

Public Instance Methods

show_params=(value) click to toggle source
# File libs/command_tree.rb, line 224
def show_params=(value)
  raise ParameterError.new("Show argument must be of type Array") if !vaue.is_a?(Array)
  @show_params=value
end