Module: Middleman::CoreExtensions::Data::InstanceMethods
- Defined in:
- lib/middleman-core/core_extensions/data.rb
Overview
Instance methods
Instance Method Summary collapse
-
#data ⇒ DataStore
The data object.
-
#initialize ⇒ Object
Setup data files before anything else so they are available when parsing config.rb.
Instance Method Details
#data ⇒ DataStore
The data object
41 42 43 |
# File 'lib/middleman-core/core_extensions/data.rb', line 41 def data @_data ||= DataStore.new(self) end |
#initialize ⇒ Object
Setup data files before anything else so they are available when parsing config.rb
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/middleman-core/core_extensions/data.rb', line 26 def initialize self.files.changed DataStore.matcher do |file| self.data.touch_file(file) if file.start_with?("#{config[:data_dir]}/") end self.files.deleted DataStore.matcher do |file| self.data.remove_file(file) if file.start_with?("#{config[:data_dir]}/") end super end |