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.



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

def initialize
  @is_word = false
  @input = Array.new
end

Instance Attribute Details

#inputObject

Returns the value of attribute input.



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

def input
  @input
end

#is_wordObject

Returns the value of attribute is_word.



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

def is_word
  @is_word
end

Instance Method Details

#input_to_sObject



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

def input_to_s
  @input.join.to_s
end