Class: Prickle::Capybara::XPath::Expression
- Inherits:
-
Object
- Object
- Prickle::Capybara::XPath::Expression
- Defined in:
- lib/prickle/capybara/xpath/expression.rb
Direct Known Subclasses
Constant Summary collapse
- CONTAINS =
".like"
- TEXT_IDENTIFIER =
"text()"
- SEPARATOR =
" and "
Instance Method Summary collapse
-
#initialize(identifier, value) ⇒ Expression
constructor
A new instance of Expression.
- #to_s ⇒ Object
Constructor Details
#initialize(identifier, value) ⇒ Expression
Returns a new instance of Expression.
10 11 12 13 |
# File 'lib/prickle/capybara/xpath/expression.rb', line 10 def initialize identifier, value @identifier = identifier @value = value end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/prickle/capybara/xpath/expression.rb', line 15 def to_s find_exact_match? ? MatchesValue.new(@identifier, @value).to_s : ContainsValue.new(@identifier, @value).to_s end |