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.
9 10 11 12 |
# File 'lib/applitools/core/text_trigger.rb', line 9 def initialize(text, control) @text = text @control = control end |
Instance Attribute Details
#control ⇒ Object (readonly)
Returns the value of attribute control.
7 8 9 |
# File 'lib/applitools/core/text_trigger.rb', line 7 def control @control end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
7 8 9 |
# File 'lib/applitools/core/text_trigger.rb', line 7 def text @text end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/applitools/core/text_trigger.rb', line 14 def to_hash { triggerType: trigger_type, text: text, control: control.to_hash } end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/applitools/core/text_trigger.rb', line 22 def to_s "Text [#{@control}] #{@text}" end |