Class: KeyboardInput

Inherits:
Object
  • Object
show all
Defined in:
lib/MonkeyKeyboard/keyboard_input.rb

Overview

Represents keyboard input.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeKeyboardInput

Returns a new instance of KeyboardInput.



7
8
9
10
# File 'lib/MonkeyKeyboard/keyboard_input.rb', line 7

def initialize
  @is_word = false
  @input = []
end

Instance Attribute Details

#inputObject

Returns the value of attribute input.



5
6
7
# File 'lib/MonkeyKeyboard/keyboard_input.rb', line 5

def input
  @input
end

#is_wordObject

Returns the value of attribute is_word.



5
6
7
# File 'lib/MonkeyKeyboard/keyboard_input.rb', line 5

def is_word
  @is_word
end

Instance Method Details

#input_to_sObject



12
13
14
# File 'lib/MonkeyKeyboard/keyboard_input.rb', line 12

def input_to_s
  @input.join.to_s
end