Class: Overule::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/overule/action.rb

Overview

Handles the execution of actions defined in rules Actions can be static assignments or dynamic operations to be performed when conditions are met

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, ctx) ⇒ Action

Returns a new instance of Action.



8
9
10
11
# File 'lib/overule/action.rb', line 8

def initialize(config, ctx)
  @config = config
  @ctx    = ctx
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



6
7
8
# File 'lib/overule/action.rb', line 6

def config
  @config
end

#ctxObject (readonly)

Returns the value of attribute ctx.



6
7
8
# File 'lib/overule/action.rb', line 6

def ctx
  @ctx
end

Instance Method Details

#fireObject



13
14
15
16
# File 'lib/overule/action.rb', line 13

def fire
  # Only static for now
  config["$static"]
end

#fire!Object



18
19
20
# File 'lib/overule/action.rb', line 18

def fire!
  # Implement
end