Class: Nanoc::Core::Checksummer::ContextUpdateBehavior

Inherits:
UpdateBehavior
  • Object
show all
Defined in:
lib/nanoc/core/checksummer.rb

Class Method Summary collapse

Class Method Details

.update(obj, digest) ⇒ Object



153
154
155
156
157
158
159
160
# File 'lib/nanoc/core/checksummer.rb', line 153

def self.update(obj, digest)
  obj.instance_variables.each do |var|
    digest.update(var.to_s)
    digest.update('=')
    yield(obj.instance_variable_get(var))
    digest.update(',')
  end
end