Class: Ruleby::Steel::RulebookHelper
- Inherits:
-
Object
- Object
- Ruleby::Steel::RulebookHelper
- Includes:
- Ruleby
- Defined in:
- lib/dsl/steel.rb
Instance Attribute Summary collapse
-
#engine ⇒ Object
readonly
Returns the value of attribute engine.
Instance Method Summary collapse
-
#initialize(engine) ⇒ RulebookHelper
constructor
A new instance of RulebookHelper.
- #rule(name) {|r| ... } ⇒ Object
Constructor Details
#initialize(engine) ⇒ RulebookHelper
Returns a new instance of RulebookHelper.
17 18 19 20 |
# File 'lib/dsl/steel.rb', line 17 def initialize(engine) raise 'This DSL is deprecated' @engine = engine end |
Instance Attribute Details
#engine ⇒ Object (readonly)
Returns the value of attribute engine.
22 23 24 |
# File 'lib/dsl/steel.rb', line 22 def engine @engine end |
Instance Method Details
#rule(name) {|r| ... } ⇒ Object
24 25 26 27 28 29 |
# File 'lib/dsl/steel.rb', line 24 def rule(name, &block) r = Steel::RuleBuilder.new name yield r if block_given? @engine.assert_rule r.build_rule r end |