Method: Roby::Transaction#remove_object
- Defined in:
- lib/roby/transactions.rb
#remove_object(object) ⇒ Object
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/roby/transactions.rb', line 142 def remove_object(object) raise "transaction #{self} has been either committed or discarded. No modification allowed" if freezed? object = may_unwrap(object) proxy = proxy_objects[object] || object # removing the proxy may trigger some discovery (event relations # for instance, if proxy is a task). Do it first, or #discover # will be called and the modifications of internal structures # nulled (like #removed_objects) ... remove_plan_object(proxy) proxy_objects.delete(object) if object.plan == self.plan # +object+ is new in the transaction removed_objects.insert(object) end end |