Sha256: d534b585f1651823c134b25325e017fda01b5897d7255cc7fddba1fac9ae3d94

Contents?: true

Size: 668 Bytes

Versions: 12

Compression:

Stored size: 668 Bytes

Contents

require 'solid'
require 'locomotive/mounter'
require 'locomotive/wagon/liquid/scopeable'
require 'locomotive/wagon/liquid/drops/base'
require 'locomotive/wagon/liquid/tags/hybrid'
require 'locomotive/wagon/liquid/tags/path_helper'

%w{. drops tags filters}.each do |dir|
  Dir[File.join(File.dirname(__FILE__), 'liquid', dir, '*.rb')].each { |lib| require lib }
end

# add to_liquid methods to main models from the mounter
%w{site page content_entry}.each do |name|
  klass = "Locomotive::Mounter::Models::#{name.classify}".constantize

  klass.class_eval <<-EOV
    def to_liquid
      ::Locomotive::Wagon::Liquid::Drops::#{name.classify}.new(self)
    end
  EOV
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
locomotivecms_wagon-1.5.8 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.5.7 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.5.6 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.5.5 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.5.4 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.5.3 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.5.2 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.5.1 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.5.0 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.5.0.rc1 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.4.0 lib/locomotive/wagon/liquid.rb
locomotivecms_wagon-1.3.3 lib/locomotive/wagon/liquid.rb