Sha256: cbed82efbf205d58b018db87dcd9271513635e5d8002aefeec20a3f99ba29c6b

Contents?: true

Size: 511 Bytes

Versions: 13

Compression:

Stored size: 511 Bytes

Contents

module Locomotive
  class PluginWithTags

    include Locomotive::Plugin

    class Paragraph < ::Liquid::Block
      def render(context)
        "<p>#{render_all(@nodelist, context)}</p>"
      end

      def render_disabled(context)
        render_all(@nodelist, context)
      end
    end

    class Newline < ::Liquid::Tag
      def render(context)
        "<br />"
      end
    end

    def self.liquid_tags
      {
        :paragraph => Paragraph,
        :newline => Newline
      }
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
locomotive_plugins-1.2.0 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.1.1 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.1.0 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.1 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.0.beta10 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.0.beta9 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.0.beta8 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.0.beta7 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.0.beta6 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.0.beta5 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.0.beta4 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.0.beta3 spec/support/plugins/plugin_with_tags.rb
locomotive_plugins-1.0.0.beta2 spec/support/plugins/plugin_with_tags.rb