Class: Monosasi::DSL::Context::Rule
- Inherits:
-
Object
- Object
- Monosasi::DSL::Context::Rule
- Includes:
- TemplateHelper
- Defined in:
- lib/monosasi/dsl/context/rule.rb
Defined Under Namespace
Classes: Target
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(context, name, &block) ⇒ Rule
constructor
A new instance of Rule.
Methods included from TemplateHelper
Constructor Details
#initialize(context, name, &block) ⇒ Rule
Returns a new instance of Rule.
4 5 6 7 8 9 |
# File 'lib/monosasi/dsl/context/rule.rb', line 4 def initialize(context, name, &block) @name = name @context = context.merge(rule_name: name) @result = {:targets => {}} instance_eval(&block) end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
11 12 13 |
# File 'lib/monosasi/dsl/context/rule.rb', line 11 def result @result end |