Class: Puppeteer::Keyboard::KeyDescription

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/keyboard/key_description.rb

Overview

  • @typedef Object KeyDescription

  • @property number keyCode

  • @property string key

  • @property string text

  • @property string code

  • @property number location

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key_code: nil, key: nil, text: nil, code: nil, location: nil) ⇒ KeyDescription

Returns a new instance of KeyDescription.



9
10
11
12
13
14
15
# File 'lib/puppeteer/keyboard/key_description.rb', line 9

def initialize(key_code: nil, key: nil, text: nil, code: nil, location: nil)
  @key_code = key_code
  @key = key
  @text = text
  @code = code
  @location = location
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



17
18
19
# File 'lib/puppeteer/keyboard/key_description.rb', line 17

def code
  @code
end

#keyObject (readonly)

Returns the value of attribute key.



17
18
19
# File 'lib/puppeteer/keyboard/key_description.rb', line 17

def key
  @key
end

#key_codeObject (readonly)

Returns the value of attribute key_code.



17
18
19
# File 'lib/puppeteer/keyboard/key_description.rb', line 17

def key_code
  @key_code
end

#locationObject (readonly)

Returns the value of attribute location.



17
18
19
# File 'lib/puppeteer/keyboard/key_description.rb', line 17

def location
  @location
end

#textObject (readonly)

Returns the value of attribute text.



17
18
19
# File 'lib/puppeteer/keyboard/key_description.rb', line 17

def text
  @text
end