Class: Pendulum::Command::Apply
- Inherits:
-
Object
- Object
- Pendulum::Command::Apply
- Defined in:
- lib/pendulum/command/apply.rb,
lib/pendulum/command/apply/schedule.rb,
lib/pendulum/command/apply/result_url.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#dry_run ⇒ Object
Returns the value of attribute dry_run.
-
#force ⇒ Object
Returns the value of attribute force.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client, from, to, dry_run = false, force = false, color = false) ⇒ Apply
constructor
A new instance of Apply.
Constructor Details
#initialize(client, from, to, dry_run = false, force = false, color = false) ⇒ Apply
Returns a new instance of Apply.
5 6 7 |
# File 'lib/pendulum/command/apply.rb', line 5 def initialize(client, from, to, dry_run=false, force=false, color=false) @schedules = matched_schedules(client, from, to, dry_run, force, color) end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/pendulum/command/apply.rb', line 3 def client @client end |
#dry_run ⇒ Object
Returns the value of attribute dry_run.
3 4 5 |
# File 'lib/pendulum/command/apply.rb', line 3 def dry_run @dry_run end |
#force ⇒ Object
Returns the value of attribute force.
3 4 5 |
# File 'lib/pendulum/command/apply.rb', line 3 def force @force end |
Instance Method Details
#execute ⇒ Object
9 10 11 |
# File 'lib/pendulum/command/apply.rb', line 9 def execute @schedules.each{|s| s.apply } end |