Sha256: 395fd11380fea18dd74b551b7d2b73a5e8ee14c77bcac80562b12aa1ae6bc211

Contents?: true

Size: 776 Bytes

Versions: 6

Compression:

Stored size: 776 Bytes

Contents

module Locomotive
  module Mounter
    module Models
      class Page

        def render(context)
          self.parse(context).render(context)
        end

        protected

        def parse(context)
          options =  {
            page:           self,
            mounting_point: context.registers[:mounting_point],
            error_mode:     :strict,
            count_lines:    true
          }

          begin
            template = ::Liquid::Template.parse(self.source, options)
          rescue Liquid::SyntaxError => e
            # do it again on the raw source instead so that the error line matches
            # the source file.
            ::Liquid::Template.parse(self.template.raw_source, options)
          end
        end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
locomotivecms_steam-0.1.0 lib/locomotive/steam/monkey_patches/mounter.rb
locomotivecms_wagon-1.4.0 lib/locomotive/wagon/misc/mounter.rb
locomotivecms_wagon-1.3.3 lib/locomotive/wagon/misc/mounter.rb
locomotivecms_wagon-1.3.2 lib/locomotive/wagon/misc/mounter.rb
locomotivecms_wagon-1.3.1 lib/locomotive/wagon/misc/mounter.rb
locomotivecms_wagon-1.3.0 lib/locomotive/wagon/misc/mounter.rb