class Arboretum::Scandent::LocatorStep

Public Instance Methods

match(element) { |searched_element| ... } click to toggle source

Take step action and check for elements matching description

# File lib/arboretum/scandent.rb, line 281
def match(element)
  result = []
  search_group = element.public_send(@@action_group[@action])
  search_group.listing.each do |searched_element|
    yield searched_element if self.describes?(searched_element) and block_given?
    result << searched_element if self.describes?(searched_element)
  end
  result
end
to_s() click to toggle source
# File lib/arboretum/scandent.rb, line 291
def to_s
  step_str = '' # Don't copy reference to @@action_str[@action]
  step_str << @@action_str[@action]
  step_str << self.to_s_sans_action
end