Class: RuleEngine::RuleDescription

Inherits:
Object
  • Object
show all
Defined in:
lib/cirrocumulus/rules/engine.rb

Overview

Rule representation. After processing a ruleset, all rules are wrapped with this object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, conditions, options, code) ⇒ RuleDescription

Returns a new instance of RuleDescription.



12
13
14
15
16
17
# File 'lib/cirrocumulus/rules/engine.rb', line 12

def initialize(name, conditions, options, code)
  @name = name
  @conditions = conditions
  @options = options
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



10
11
12
# File 'lib/cirrocumulus/rules/engine.rb', line 10

def code
  @code
end

#conditionsObject (readonly)

Returns the value of attribute conditions.



8
9
10
# File 'lib/cirrocumulus/rules/engine.rb', line 8

def conditions
  @conditions
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/cirrocumulus/rules/engine.rb', line 7

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



9
10
11
# File 'lib/cirrocumulus/rules/engine.rb', line 9

def options
  @options
end