Sha256: a384475828af918885daadb1c9bbb1436708fc99caca497024c3868251a51a28

Contents?: true

Size: 296 Bytes

Versions: 8

Compression:

Stored size: 296 Bytes

Contents

module Searchgasm
  module Condition
    class EndsWith < Base
      class << self
        def condition_names_for_column
          super + ["ew", "ends", "end"]
        end
      end
      
      def to_conditions(value)
        ["#{column_sql} LIKE ?", "%#{value}"]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
searchgasm-1.3.3 lib/searchgasm/condition/ends_with.rb
searchgasm-1.3.1 lib/searchgasm/condition/ends_with.rb
searchgasm-1.3.2 lib/searchgasm/condition/ends_with.rb
searchgasm-1.3.4 lib/searchgasm/condition/ends_with.rb
searchgasm-1.3.0 lib/searchgasm/condition/ends_with.rb
searchgasm-1.4.1 lib/searchgasm/condition/ends_with.rb
searchgasm-1.4.0 lib/searchgasm/condition/ends_with.rb
searchgasm-1.3.5 lib/searchgasm/condition/ends_with.rb