Parent

Files

Class/Module Index [+]

Quicksearch

Dragonfly::JobDefinitions

Public Class Methods

new() click to toggle source
# File lib/dragonfly/job_definitions.rb, line 4
def initialize
  @job_definitions = {}
end

Public Instance Methods

add(name, &definition_proc) click to toggle source
# File lib/dragonfly/job_definitions.rb, line 8
def add(name, &definition_proc)
  job_definitions[name] = JobBuilder.new(&definition_proc)
  jd = job_definitions # Needed because we're about to change 'self'
  
  define_method name do |*args|
    jd[name].build(self, *args)
  end
  
  define_method "#{name}!" do |*args|
    jd[name].build!(self, *args)
  end
end
definition_names() click to toggle source
# File lib/dragonfly/job_definitions.rb, line 21
def definition_names
  job_definitions.keys
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.