Module: Zip::Dirtyable::ClassMethods
- Defined in:
- lib/zip/dirtyable.rb
Instance Method Summary collapse
-
#mark_dirty(*symbols) ⇒ Object
:nodoc:.
Instance Method Details
#mark_dirty(*symbols) ⇒ Object
:nodoc:
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/zip/dirtyable.rb', line 14 def mark_dirty(*symbols) # :nodoc: # Move the original method and call it after we've set the dirty flag. symbols.each do |symbol| orig_name = "orig_#{symbol}" alias_method orig_name, symbol define_method(symbol) do |param| @dirty = true send(orig_name, param) end end end |