Sha256: 71c91d1c58f729476527fe81474f26788041bba88bd964285f439682cb045278

Contents?: true

Size: 522 Bytes

Versions: 6

Compression:

Stored size: 522 Bytes

Contents

module Liquid
  module Rails
    module NumberFilter
      delegate \
                :number_to_phone,
                :number_to_currency,
                :number_to_percentage,
                :number_with_delimiter,
                :number_with_precision,
                :number_to_human_size,
                :number_to_human,

                to: :h

      private

        def h
          @h ||= @context.registers[:view]
        end
    end
  end
end

Liquid::Template.register_filter(Liquid::Rails::NumberFilter)

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
taktsoft_liquid-rails-0.1.6 lib/liquid-rails/filters/number_filter.rb
taktsoft_liquid-rails-0.1.4 lib/liquid-rails/filters/number_filter.rb
liquid-rails-0.1.3 lib/liquid-rails/filters/number_filter.rb
liquid-rails-0.1.2 lib/liquid-rails/filters/number_filter.rb
liquid-rails-0.1.1 lib/liquid-rails/filters/number_filter.rb
liquid-rails-0.1.0 lib/liquid-rails/filters/number_filter.rb