Class: Colonel::Job
- Inherits:
-
Object
- Object
- Colonel::Job
- Defined in:
- lib/colonel/job.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#schedule ⇒ Object
readonly
Returns the value of attribute schedule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(schedule, command) ⇒ Job
constructor
A new instance of Job.
- #update(opts = {}) ⇒ Object
Constructor Details
#initialize(schedule, command) ⇒ Job
Returns a new instance of Job.
6 7 8 9 10 11 12 |
# File 'lib/colonel/job.rb', line 6 def initialize(schedule, command) @schedule = schedule @command = command increase_amount @id = @@amount end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
4 5 6 |
# File 'lib/colonel/job.rb', line 4 def command @command end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/colonel/job.rb', line 4 def id @id end |
#schedule ⇒ Object (readonly)
Returns the value of attribute schedule.
4 5 6 |
# File 'lib/colonel/job.rb', line 4 def schedule @schedule end |
Class Method Details
.clear_amount ⇒ Object
14 15 16 |
# File 'lib/colonel/job.rb', line 14 def self.clear_amount @@amount = 0 end |