Class: ChronicTree::Command::RemoveSelfElement
- Inherits:
-
Object
- Object
- ChronicTree::Command::RemoveSelfElement
- Defined in:
- lib/chronic_tree/command.rb
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #do ⇒ Object
-
#initialize(source) ⇒ RemoveSelfElement
constructor
A new instance of RemoveSelfElement.
Constructor Details
#initialize(source) ⇒ RemoveSelfElement
Returns a new instance of RemoveSelfElement.
141 142 143 |
# File 'lib/chronic_tree/command.rb', line 141 def initialize(source) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
139 140 141 |
# File 'lib/chronic_tree/command.rb', line 139 def source @source end |
Instance Method Details
#do ⇒ Object
145 146 147 148 149 |
# File 'lib/chronic_tree/command.rb', line 145 def do source.existed_relation(source.current_time_at, source.current_scope_name).each do |el| el.update_attribute(:end_time, source.current_time_at) end end |