class Prickle::Capybara::XPath::Element
Public Class Methods
new(type, identifier)
click to toggle source
# File lib/prickle/capybara/xpath.rb, line 14 def initialize type, identifier @type = type @identifier = identifier end
Public Instance Methods
identifier()
click to toggle source
# File lib/prickle/capybara/xpath.rb, line 23 def identifier return @identifier.each_pair.inject([]) do | xpath, (identifier, value) | xpath << XPath::Expression.new(identifier, value).to_s end.join Expression::SEPARATOR end
to_s()
click to toggle source
# File lib/prickle/capybara/xpath.rb, line 19 def to_s "//#{@type}[#{identifier}]" end