Class: Nanoc::Core::Item
Instance Attribute Summary
Attributes inherited from Document
#attributes_checksum_data, #checksum_data, #content, #content_checksum_data, #identifier
Instance Method Summary collapse
Methods inherited from Document
#==, #attributes, #eql?, #freeze, #hash, #initialize, #inspect, #set_attribute, #with_identifier_prefix
Methods included from ContractsSupport
enabled?, included, setup_once, warn_about_performance
Constructor Details
This class inherits a constructor from Nanoc::Core::Document
Instance Method Details
#identifier=(new_identifier) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/nanoc/core/item.rb', line 10 def identifier=(new_identifier) super # Invalidate memoization cache @_reference = nil end |
#reference ⇒ Object
6 7 8 |
# File 'lib/nanoc/core/item.rb', line 6 def reference @_reference ||= "item:#{identifier}" end |