Sha256: 38726e1ef1b95ffe914c76e4e5ecc80ccb96f167cb61eeda854c6060b378f966

Contents?: true

Size: 294 Bytes

Versions: 17

Compression:

Stored size: 294 Bytes

Contents

module ExCite
  module ResourceKey
    def self.included(klass)
      klass.class_eval do
        attr_writer :resource_key
      end
    end
    # Construct a resource key if it doesn't already exist
    def resource_key 
      @resource_key ||= Digest::SHA1.hexdigest(_data)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ex_cite-2.1.0 app/models/ex_cite/resource_key.rb
ex_cite-2.0.0 app/models/ex_cite/resource_key.rb
ex_cite-2.0.0.pre.alpha.1 app/models/ex_cite/resource_key.rb
ex_cite-2.0.0.pre.alpha app/models/ex_cite/resource_key.rb
ex_cite-1.3.2 app/models/ex_cite/resource_key.rb
ex_cite-1.3.1 app/models/ex_cite/resource_key.rb
ex_cite-1.3.0 app/models/ex_cite/resource_key.rb
ex_cite-1.2.7 app/models/ex_cite/resource_key.rb
ex_cite-1.2.6 app/models/ex_cite/resource_key.rb
ex_cite-1.2.5 app/models/ex_cite/resource_key.rb
ex_cite-1.2.4 app/models/ex_cite/resource_key.rb
ex_cite-1.2.3 app/models/ex_cite/resource_key.rb
ex_cite-1.2.2 app/models/ex_cite/resource_key.rb
ex_cite-1.2.1 app/models/ex_cite/resource_key.rb
ex_cite-1.1.0 app/models/ex_cite/resource_key.rb
ex_cite-1.0.1 app/models/ex_cite/resource_key.rb
ex_cite-1.0.0 app/models/ex_cite/resource_key.rb