Sha256: 3848e69e7e126aaf83b6a333fab8fc1c4c9363715ae1fa5d58ae888f73232b0c

Contents?: true

Size: 305 Bytes

Versions: 5

Compression:

Stored size: 305 Bytes

Contents

class Trigger < SiteRecord
  collection :triggers
  field :source, :string
  field :instructions, :array
  
  before_save :compile_function
  def compile_function
    self.instructions = Function.new(source).instructions
  end
  
  def run(record)
    Function.new(instructions).execute(record)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yodel-0.0.7 lib/yodel/models/core/functions/trigger.rb
yodel-0.0.4 lib/yodel/models/core/functions/trigger.rb
yodel-0.0.3 lib/yodel/models/core/functions/trigger.rb
yodel-0.0.2 lib/yodel/models/core/functions/trigger.rb
yodel-0.0.1 lib/yodel/models/core/functions/trigger.rb