Class: Taskchampion::Replica
- Inherits:
-
Object
- Object
- Taskchampion::Replica
- Defined in:
- lib/taskchampion.rb
Overview
Override the Replica class to set the replica reference
Instance Method Summary collapse
- #_original_working_set ⇒ Object
- #commit_undo!(operations) ⇒ Object
-
#task_operations(uuid) ⇒ Object
Ruby-style convenience methods for undo functionality.
- #undo! ⇒ Object
- #undo_operations ⇒ Object
- #working_set ⇒ Object
Instance Method Details
#_original_working_set ⇒ Object
33 |
# File 'lib/taskchampion.rb', line 33 alias_method :_original_working_set, :working_set |
#commit_undo!(operations) ⇒ Object
50 51 52 |
# File 'lib/taskchampion.rb', line 50 def commit_undo!(operations) commit_reversed_operations(operations) end |
#task_operations(uuid) ⇒ Object
Ruby-style convenience methods for undo functionality
42 43 44 |
# File 'lib/taskchampion.rb', line 42 def task_operations(uuid) get_task_operations(uuid) end |
#undo! ⇒ Object
54 55 56 57 58 |
# File 'lib/taskchampion.rb', line 54 def undo! ops = undo_operations return false if ops.empty? commit_undo!(ops) end |
#undo_operations ⇒ Object
46 47 48 |
# File 'lib/taskchampion.rb', line 46 def undo_operations get_undo_operations end |
#working_set ⇒ Object
35 36 37 38 39 |
# File 'lib/taskchampion.rb', line 35 def working_set ws = _original_working_set ws.replica = self ws end |