Class: Applitools::TextTrigger
- Defined in:
- lib/applitools/core/text_trigger.rb
Constant Summary collapse
- TRIGGER_TYPE =
:Text
Instance Attribute Summary collapse
-
#control ⇒ Object
readonly
Returns the value of attribute control.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, control) ⇒ TextTrigger
constructor
A new instance of TextTrigger.
- #to_hash ⇒ Object
- #to_s ⇒ Object
Methods inherited from Trigger
Constructor Details
#initialize(text, control) ⇒ TextTrigger
Returns a new instance of TextTrigger.
7 8 9 10 |
# File 'lib/applitools/core/text_trigger.rb', line 7 def initialize(text, control) @text = text @control = control end |
Instance Attribute Details
#control ⇒ Object (readonly)
Returns the value of attribute control.
5 6 7 |
# File 'lib/applitools/core/text_trigger.rb', line 5 def control @control end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/applitools/core/text_trigger.rb', line 5 def text @text end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/applitools/core/text_trigger.rb', line 12 def to_hash { triggerType: trigger_type, text: text, control: control.to_hash } end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/applitools/core/text_trigger.rb', line 20 def to_s "Text [#{@control}] #{@text}" end |