Class: MultiScheduler::Schedule
- Inherits:
-
Object
- Object
- MultiScheduler::Schedule
- Defined in:
- lib/multi_scheduler/schedule.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#command_arguments ⇒ Object
readonly
Returns the value of attribute command_arguments.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
Instance Method Summary collapse
-
#initialize(id, options = {}) ⇒ Schedule
constructor
A new instance of Schedule.
Constructor Details
#initialize(id, options = {}) ⇒ Schedule
Returns a new instance of Schedule.
7 8 9 10 11 12 13 14 15 |
# File 'lib/multi_scheduler/schedule.rb', line 7 def initialize id, = {} @identifier = id raise "identifier is required" unless @identifier @command_arguments = [ [:args] ].flatten.compact @command = [:command] || @command_arguments.shift raise "command is required" unless @command end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'lib/multi_scheduler/schedule.rb', line 5 def command @command end |
#command_arguments ⇒ Object (readonly)
Returns the value of attribute command_arguments.
5 6 7 |
# File 'lib/multi_scheduler/schedule.rb', line 5 def command_arguments @command_arguments end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
5 6 7 |
# File 'lib/multi_scheduler/schedule.rb', line 5 def identifier @identifier end |