Class: Whenever::Job
- Inherits:
-
Object
- Object
- Whenever::Job
- Defined in:
- lib/whenever/job.rb
Instance Attribute Summary collapse
-
#at ⇒ Object
Returns the value of attribute at.
-
#output_redirection ⇒ Object
Returns the value of attribute output_redirection.
-
#raw_syntex ⇒ Object
Returns the value of attribute raw_syntex.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Job
constructor
A new instance of Job.
- #output ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Job
Returns a new instance of Job.
6 7 8 9 10 11 12 13 14 |
# File 'lib/whenever/job.rb', line 6 def initialize( = {}) @options = @at = [:at] @output_redirection = .has_key?(:output) ? [:output] : :not_set @options[:environment] ||= :production @options[:path] ||= Whenever.path @raw_syntex = [:raw_syntex] || false end |
Instance Attribute Details
#at ⇒ Object
Returns the value of attribute at.
4 5 6 |
# File 'lib/whenever/job.rb', line 4 def at @at end |
#output_redirection ⇒ Object
Returns the value of attribute output_redirection.
4 5 6 |
# File 'lib/whenever/job.rb', line 4 def output_redirection @output_redirection end |
#raw_syntex ⇒ Object
Returns the value of attribute raw_syntex.
4 5 6 |
# File 'lib/whenever/job.rb', line 4 def raw_syntex @raw_syntex end |
Instance Method Details
#output ⇒ Object
16 17 18 19 20 |
# File 'lib/whenever/job.rb', line 16 def output @options[:template].gsub(/:\w+/) do |key| @options[key.sub(':', '').to_sym] end end |