class RoadForest::PathMatcher::MatchStep
Attributes
after[RW]
before[RW]
children[R]
exact_value[RW]
graph[RW]
graph_term[RW]
order[RW]
parent[RW]
pattern[RW]
pattern_step[RW]
repeats[RW]
satified[RW]
stem[RW]
type[RW]
Public Class Methods
new() { |self| ... }
click to toggle source
# File lib/roadforest/path-matcher.rb, line 51 def initialize @children = nil reset yield self @satisfied ||= {} @stem ||= {} @repeats ||= {} end
Public Instance Methods
immediate_match()
click to toggle source
# File lib/roadforest/path-matcher.rb, line 69 def immediate_match {} end
matched_statements()
click to toggle source
# File lib/roadforest/path-matcher.rb, line 83 def matched_statements return {} unless accepting? @matched_statements ||= begin children.map do |child| child.matched_statements end.inject(immediate_match) do |set, matched| set.merge(matched) end end end
open()
click to toggle source
# File lib/roadforest/path-matcher.rb, line 73 def open if excluded? return @children = [] end @children ||= build_children return children end
pretty_print_instance_variables()
click to toggle source
# File lib/roadforest/path-matcher.rb, line 63 def pretty_print_instance_variables instance_variables.reject do |var| var == :@parent end end
reset()
click to toggle source
# File lib/roadforest/path-matcher.rb, line 60 def reset end