Exception: Command::CommandException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/command-set/command-set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ CommandException

Returns a new instance of CommandException.



103
104
105
106
107
# File 'lib/command-set/command-set.rb', line 103

def initialize(msg=nil)
  super
  @raw_input = nil
  @command = nil
end

Instance Attribute Details

#commandObject

Returns the value of attribute command.



121
122
123
# File 'lib/command-set/command-set.rb', line 121

def command
  @command
end

#raw_inputObject

Returns the value of attribute raw_input.



121
122
123
# File 'lib/command-set/command-set.rb', line 121

def raw_input
  @raw_input
end

Instance Method Details

#messageObject



109
110
111
112
113
114
115
116
117
118
119
# File 'lib/command-set/command-set.rb', line 109

def message
  if @command.nil?
    if @raw_input.nil?
      super
    else
      return @raw_input.inspect() +": "+ super
    end
  else
    return @command.path.join(" ") +": "+ super
  end
end