Sha256: a4b072a2d6baff52625fc817891af1414c9535a46dd02ead08ccd2b312dde463

Contents?: true

Size: 637 Bytes

Versions: 1

Compression:

Stored size: 637 Bytes

Contents

require 'solid'
require 'locomotive/mounter'

require_relative 'liquid/scopeable'
require_relative 'liquid/drops/base'
require_relative 'liquid/tags/hybrid'
require_relative '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::Steam::Liquid::Drops::#{name.classify}.new(self)
    end
  EOV
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
locomotivecms_steam-0.1.1 lib/locomotive/steam/liquid.rb