Exception: Twterm::KeyMapper::NoSuchCommand

Inherits:
StandardError
  • Object
show all
Defined in:
lib/twterm/key_mapper/no_such_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(category, command) ⇒ NoSuchCommand

Returns a new instance of NoSuchCommand.



6
7
8
9
# File 'lib/twterm/key_mapper/no_such_command.rb', line 6

def initialize(category, command)
  @category, @command = category, command
  super(message)
end

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



4
5
6
# File 'lib/twterm/key_mapper/no_such_command.rb', line 4

def category
  @category
end

#commandObject (readonly)

Returns the value of attribute command.



4
5
6
# File 'lib/twterm/key_mapper/no_such_command.rb', line 4

def command
  @command
end

Instance Method Details

#full_commandObject



11
12
13
# File 'lib/twterm/key_mapper/no_such_command.rb', line 11

def full_command
  "#{category}.#{command}"
end

#messageObject



15
16
17
# File 'lib/twterm/key_mapper/no_such_command.rb', line 15

def message
  "No such command: #{full_command}"
end