Class: Katalyst::Tables::Collection::Type::String::Match
- Inherits:
-
Object
- Object
- Katalyst::Tables::Collection::Type::String::Match
- Includes:
- ActiveRecord::Sanitization::ClassMethods
- Defined in:
- lib/katalyst/tables/collection/type/string.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ Match
constructor
A new instance of Match.
- #to_sql ⇒ Object
Constructor Details
#initialize(value) ⇒ Match
Returns a new instance of Match.
27 28 29 |
# File 'lib/katalyst/tables/collection/type/string.rb', line 27 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
25 26 27 |
# File 'lib/katalyst/tables/collection/type/string.rb', line 25 def value @value end |
Instance Method Details
#to_sql ⇒ Object
31 32 33 |
# File 'lib/katalyst/tables/collection/type/string.rb', line 31 def to_sql "%#{sanitize_sql_like(value)}%" end |