Sha256: 8925f2d0cb2a738f399f26eadbf2b7087ec5a778ccfcd9d9df4383df3c4c79dd

Contents?: true

Size: 657 Bytes

Versions: 12

Compression:

Stored size: 657 Bytes

Contents

module FilteredColumn
  module Filters
    class Base
      class << self
        def filter(text) text end
        def escape(text) text end

        def filter_name
          set_name self.name.demodulize.gsub(/Filter$/, '')
        end
        
        def set_name(name)
          class << self; attr_reader :filter_name ; end
          @filter_name = name
        end
        
        def filter_key
          set_key self.name.demodulize.underscore.to_sym
        end
        
        def set_key(key)
          class << self; attr_reader :filter_key ; end
          @filter_key = key
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
adva-0.2.4 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.2.3 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.2.2 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.2.1 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.2.0 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.1.4 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.1.3 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.1.2 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.1.1 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.1.0 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva_cms-0.0.1 vendor/gems/filtered_column/lib/filtered_column/filters/base.rb
adva-0.0.1 adva_cms/vendor/gems/filtered_column/lib/filtered_column/filters/base.rb