Class: Dragonfly::JobBuilder

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

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ JobBuilder

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

#build(job, *args) ⇒ Object



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

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

#build!(job, *args) ⇒ Object



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

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