Sha256: 3d2c1da15b4be4de47e9f65803b890ab3ae3c9eb0498b173dee293e18c1ac5c1

Contents?: true

Size: 394 Bytes

Versions: 9

Compression:

Stored size: 394 Bytes

Contents

module Locomotive
  class PluginWithFilter
    include Locomotive::Plugin

    module Filters
      def add_http(input)
        if input.start_with?('http://')
          input
        else
          "http://#{input}"
        end
      end

      def link_to(input, href)
        %{<a href="#{href}">#{input}</a>}
      end
    end

    def self.liquid_filters
      Filters
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotive_plugins-1.2.0 spec/support/plugins/plugin_with_filter.rb
locomotive_plugins-1.1.1 spec/support/plugins/plugin_with_filter.rb
locomotive_plugins-1.1.0 spec/support/plugins/plugin_with_filter.rb
locomotive_plugins-1.0.1 spec/support/plugins/plugin_with_filter.rb
locomotive_plugins-1.0.0.beta10 spec/support/plugins/plugin_with_filter.rb
locomotive_plugins-1.0.0.beta9 spec/support/plugins/plugin_with_filter.rb
locomotive_plugins-1.0.0.beta8 spec/support/plugins/plugin_with_filter.rb
locomotive_plugins-1.0.0.beta7 spec/support/plugins/plugin_with_filter.rb
locomotive_plugins-1.0.0.beta6 spec/support/plugins/plugin_with_filter.rb