Class: Rum::Key

Inherits:
Object
  • Object
show all
Defined in:
lib/rum/hotkey_core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, aliases, id) ⇒ Key

Returns a new instance of Key.



5
6
7
8
9
10
# File 'lib/rum/hotkey_core.rb', line 5

def initialize name, aliases, id
  @name = name
  @id = id
  @aliases = aliases
  @modifier = false
end

Instance Attribute Details

#aliasesObject

Returns the value of attribute aliases.



3
4
5
# File 'lib/rum/hotkey_core.rb', line 3

def aliases
  @aliases
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/rum/hotkey_core.rb', line 3

def id
  @id
end

#modifierObject

Returns the value of attribute modifier.



3
4
5
# File 'lib/rum/hotkey_core.rb', line 3

def modifier
  @modifier
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/rum/hotkey_core.rb', line 3

def name
  @name
end

Instance Method Details

#inspectObject



16
17
18
# File 'lib/rum/hotkey_core.rb', line 16

def inspect
  "#<Key:#{name}>"
end

#modifier?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/rum/hotkey_core.rb', line 12

def modifier?
  @modifier
end