class Vernacular::ConfigurationHash

Builds a hash out of the given modifiers that represents that current state of configuration. This ensures that if the configuration of `Vernacular` changes between runs it doesn't pick up the old compiled files.

Attributes

modifiers[R]

Public Class Methods

new(modifiers = []) click to toggle source
# File lib/vernacular/configuration_hash.rb, line 10
def initialize(modifiers = [])
  @modifiers = modifiers
end

Public Instance Methods

hash() click to toggle source
# File lib/vernacular/configuration_hash.rb, line 14
def hash
  digest = Digest::MD5.new
  modifiers.each do |modifier|
    digest << modifier.components.inspect
  end
  digest.to_s
end