Class: Applitools::TextTrigger

Inherits:
Object
  • Object
show all
Defined in:
lib/eyes_selenium/eyes/text_trigger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, control) ⇒ TextTrigger

Returns a new instance of TextTrigger.



5
6
7
8
# File 'lib/eyes_selenium/eyes/text_trigger.rb', line 5

def initialize(text, control)
  @text = text
  @control = control
end

Instance Attribute Details

#controlObject (readonly)

Returns the value of attribute control.



3
4
5
# File 'lib/eyes_selenium/eyes/text_trigger.rb', line 3

def control
  @control
end

#textObject (readonly)

Returns the value of attribute text.



3
4
5
# File 'lib/eyes_selenium/eyes/text_trigger.rb', line 3

def text
  @text
end

Instance Method Details

#to_hashObject



10
11
12
13
14
# File 'lib/eyes_selenium/eyes/text_trigger.rb', line 10

def to_hash
  {
    triggetType: 'Text', text: text, control: control.to_hash
  }
end

#to_sObject



16
17
18
# File 'lib/eyes_selenium/eyes/text_trigger.rb', line 16

def to_s
  "Text [#{@control}] #{@text}"
end