class DecisionMaker::DSL

Constants

Default
Porter

Attributes

porter[RW]

Public Class Methods

new() click to toggle source
# File lib/decision_maker/dsl.rb, line 18
def initialize
  self.porter = Porter.new(*Default.values)
end

Public Instance Methods

definition() click to toggle source
# File lib/decision_maker/dsl.rb, line 3
def definition
  porter
end

Private Instance Methods

rule(rule_table)
Alias for: table
rule_name(table_name)
Alias for: table_name
table(rule_table) click to toggle source
# File lib/decision_maker/dsl.rb, line 22
def table(rule_table)
  porter.rule_table = rule_table
end
Also aliased as: rule
table_name(table_name) click to toggle source
# File lib/decision_maker/dsl.rb, line 27
def table_name(table_name)
  self.class.module_exec(table_name) do |new_name|
    alias_method new_name, :table
  end
end
Also aliased as: rule_name