Class: Dragonfly::Job::Step
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#job ⇒ Object
readonly
Returns the value of attribute job.
Class Method Summary collapse
-
.abbreviation ⇒ Object
Dragonfly::Job::Fetch -> :f.
-
.basename ⇒ Object
Dragonfly::Job::Fetch -> ‘Fetch’.
-
.step_name ⇒ Object
Dragonfly::Job::Fetch -> :fetch.
Instance Method Summary collapse
-
#init ⇒ Object
To be overridden.
-
#initialize(job, *args) ⇒ Step
constructor
A new instance of Step.
- #inspect ⇒ Object
Constructor Details
#initialize(job, *args) ⇒ Step
Returns a new instance of Step.
42 43 44 45 |
# File 'lib/dragonfly/job.rb', line 42 def initialize(job, *args) @job, @args = job, args init end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args
50 51 52 |
# File 'lib/dragonfly/job.rb', line 50 def args @args end |
#job ⇒ Object (readonly)
Returns the value of attribute job
50 51 52 |
# File 'lib/dragonfly/job.rb', line 50 def job @job end |
Class Method Details
.abbreviation ⇒ Object
Dragonfly::Job::Fetch -> :f
37 38 39 |
# File 'lib/dragonfly/job.rb', line 37 def abbreviation @abbreviation ||= basename.scan(/[A-Z]/).join.downcase.to_sym end |
.basename ⇒ Object
Dragonfly::Job::Fetch -> ‘Fetch’
29 30 31 |
# File 'lib/dragonfly/job.rb', line 29 def basename @basename ||= name.split('::').last end |
.step_name ⇒ Object
Dragonfly::Job::Fetch -> :fetch
33 34 35 |
# File 'lib/dragonfly/job.rb', line 33 def step_name @step_name ||= basename.gsub(/[A-Z]/){ "_#{$&.downcase}" }.sub('_','').to_sym end |