Class: ActiveFacts::CQL::Compiler::Enforcement

Inherits:
Object
  • Object
show all
Defined in:
lib/activefacts/cql/compiler/constraint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionObject (readonly)

Returns the value of attribute action.



5
6
7
# File 'lib/activefacts/cql/compiler/constraint.rb', line 5

def action
  @action
end

#agentObject (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