Class: ActiveFacts::CQL::Compiler::Enforcement
- Inherits:
-
Object
- Object
- ActiveFacts::CQL::Compiler::Enforcement
- Defined in:
- lib/activefacts/cql/compiler/constraint.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
Instance Method Summary collapse
- #compile(constellation, constraint) ⇒ Object
-
#initialize(action, agent) ⇒ Enforcement
constructor
A new instance of Enforcement.
Constructor Details
#initialize(action, agent) ⇒ Enforcement
Returns a new instance of Enforcement.
6 7 8 9 |
# File 'lib/activefacts/cql/compiler/constraint.rb', line 6 def initialize action, agent @action = action @agent = agent end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
5 6 7 |
# File 'lib/activefacts/cql/compiler/constraint.rb', line 5 def action @action end |
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
5 6 7 |
# File 'lib/activefacts/cql/compiler/constraint.rb', line 5 def agent @agent end |
Instance Method Details
#compile(constellation, constraint) ⇒ Object
11 12 13 |
# File 'lib/activefacts/cql/compiler/constraint.rb', line 11 def compile constellation, constraint constellation.Enforcement(constraint, :enforcement_code => @action, :agent => @agent) end |