Class: Dragonfly::JobBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/dragonfly/job_builder.rb

Instance Method Summary (collapse)

Constructor Details

- (JobBuilder) initialize(&block)

Returns a new instance of JobBuilder



4
5
6
# File 'lib/dragonfly/job_builder.rb', line 4

def initialize(&block)
  @block = block
end

Instance Method Details

- (Object) build(job, *args)



8
9
10
# File 'lib/dragonfly/job_builder.rb', line 8

def build(job, *args)
  evaluate_block(job, false, *args)
end

- (Object) build!(job, *args)



12
13
14
# File 'lib/dragonfly/job_builder.rb', line 12

def build!(job, *args)
  evaluate_block(job, true, *args)
end