Class: Pendulum::Command::Apply::Schedule
- Inherits:
-
Object
- Object
- Pendulum::Command::Apply::Schedule
- Defined in:
- lib/pendulum/command/apply/schedule.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#color ⇒ Object
Returns the value of attribute color.
-
#dry_run ⇒ Object
Returns the value of attribute dry_run.
-
#force ⇒ Object
Returns the value of attribute force.
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(client, from, to, dry_run = false, force = false, color = false) ⇒ Schedule
constructor
A new instance of Schedule.
Constructor Details
#initialize(client, from, to, dry_run = false, force = false, color = false) ⇒ Schedule
Returns a new instance of Schedule.
7 8 9 10 11 12 13 14 |
# File 'lib/pendulum/command/apply/schedule.rb', line 7 def initialize(client, from, to, dry_run=false, force=false, color=false) self.client = client self.from = from self.to = to self.dry_run = dry_run self.force = force self.color = color end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
6 7 8 |
# File 'lib/pendulum/command/apply/schedule.rb', line 6 def client @client end |
#color ⇒ Object
Returns the value of attribute color.
6 7 8 |
# File 'lib/pendulum/command/apply/schedule.rb', line 6 def color @color end |
#dry_run ⇒ Object
Returns the value of attribute dry_run.
6 7 8 |
# File 'lib/pendulum/command/apply/schedule.rb', line 6 def dry_run @dry_run end |
#force ⇒ Object
Returns the value of attribute force.
6 7 8 |
# File 'lib/pendulum/command/apply/schedule.rb', line 6 def force @force end |
#from ⇒ Object
Returns the value of attribute from.
6 7 8 |
# File 'lib/pendulum/command/apply/schedule.rb', line 6 def from @from end |
#to ⇒ Object
Returns the value of attribute to.
6 7 8 |
# File 'lib/pendulum/command/apply/schedule.rb', line 6 def to @to end |
Instance Method Details
#apply ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/pendulum/command/apply/schedule.rb', line 16 def apply case when will_create? then create when will_update? then update when will_delete? then delete end end |