Class: Applitools::Base::TextTrigger
- Inherits:
-
Object
- Object
- Applitools::Base::TextTrigger
- Defined in:
- lib/applitools/base/text_trigger.rb
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
Constructor Details
#initialize(text, control) ⇒ TextTrigger
Returns a new instance of TextTrigger.
5 6 7 8 |
# File 'lib/applitools/base/text_trigger.rb', line 5 def initialize(text, control) @text = text @control = control end |
Instance Attribute Details
#control ⇒ Object (readonly)
Returns the value of attribute control.
3 4 5 |
# File 'lib/applitools/base/text_trigger.rb', line 3 def control @control end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
3 4 5 |
# File 'lib/applitools/base/text_trigger.rb', line 3 def text @text end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/applitools/base/text_trigger.rb', line 10 def to_hash { trigget_type: 'Text', text: text, control: control.to_hash } end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/applitools/base/text_trigger.rb', line 18 def to_s "Text [#{@control}] #{@text}" end |