Class: Whenever::Job::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/whenever/job_types/default.rb

Direct Known Subclasses

RakeTask, Runner

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Default

Returns a new instance of Default.



7
8
9
10
11
12
13
14
15
# File 'lib/whenever/job_types/default.rb', line 7

def initialize(options = {})
  @task               = options[:task]
  @at                 = options[:at]
  @framework_env      = options[:framework_env] || "MERB_ENV"
  @rake_path          = options[:rake_path] || "bundle exec rake"
  @output_redirection = options.has_key?(:output) ? options[:output] : :not_set
  @environment        = options[:environment] || :production
  @path               = options[:path] || Whenever.path
end

Instance Attribute Details

#atObject

Returns the value of attribute at.



5
6
7
# File 'lib/whenever/job_types/default.rb', line 5

def at
  @at
end

#outputObject

Returns the value of attribute output.



5
6
7
# File 'lib/whenever/job_types/default.rb', line 5

def output
  @output
end

#output_redirectionObject

Returns the value of attribute output_redirection.



5
6
7
# File 'lib/whenever/job_types/default.rb', line 5

def output_redirection
  @output_redirection
end

#taskObject

Returns the value of attribute task.



5
6
7
# File 'lib/whenever/job_types/default.rb', line 5

def task
  @task
end