Class: RuleTable::TableDefiner

Inherits:
Object
  • Object
show all
Defined in:
lib/rule_table.rb

Instance Method Summary collapse

Constructor Details

#initialize(table, &block) ⇒ TableDefiner

Returns a new instance of TableDefiner.



52
53
54
55
# File 'lib/rule_table.rb', line 52

def initialize(table, &block)
  @table = table
  instance_eval(&block)
end

Instance Method Details

#match(matcher_name, *args) ⇒ Object



61
62
63
# File 'lib/rule_table.rb', line 61

def match(matcher_name, *args)
  ConfiguredMatcher.new(matcher_name, *args)
end

#rule(*args) ⇒ Object



57
58
59
# File 'lib/rule_table.rb', line 57

def rule(*args)
  @table.add_rule_for(*args)
end