class SheepAst::ExactGroupMatch
ExactGroupMatch
instance
@see new
Attributes
keys[RW]
Public Instance Methods
init()
click to toggle source
# File lib/sheep_ast/match/exact_group_match.rb, line 37 def init @expr = '' end
kind?()
click to toggle source
# File lib/sheep_ast/match/exact_group_match.rb, line 32 def kind? return MatchKind::ExactGroup end
lookup(data)
click to toggle source
# File lib/sheep_ast/match/exact_group_match.rb, line 42 def lookup(data) key = data.expr ldebug? and ldebug "lookup for #{T.must(key)}" @keys.each do |item| if key == item ldebug? and ldebug 'Found' return true end end ldebug? and ldebug "Not Found => group keys: #{keys.inspect}" return false end
new(keys, sym = nil, **options)
click to toggle source
# File lib/sheep_ast/match/exact_group_match.rb, line 25 def new(keys, sym = nil, **options) ins = T.unsafe(ExactGroupMatch).new(keys.inspect.to_s, sym, **options) ins.keys = keys return ins end