Module: ExCite::ResourceKey
- Included in:
- Citation
- Defined in:
- app/models/ex_cite/resource_key.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#resource_key ⇒ Object
Construct a resource key if it doesn’t already exist.
Class Method Details
.included(klass) ⇒ Object
3 4 5 6 7 |
# File 'app/models/ex_cite/resource_key.rb', line 3 def self.included(klass) klass.class_eval do attr_writer :resource_key end end |
Instance Method Details
#resource_key ⇒ Object
Construct a resource key if it doesn’t already exist
9 10 11 |
# File 'app/models/ex_cite/resource_key.rb', line 9 def resource_key @resource_key ||= Digest::SHA1.hexdigest(_data) end |