Class: Quercle::Operator::StartsWith
- Inherits:
-
Object
- Object
- Quercle::Operator::StartsWith
- Defined in:
- lib/quercle/operator/starts_with.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ StartsWith
constructor
A new instance of StartsWith.
- #sql_fragment ⇒ Object
Constructor Details
#initialize(value) ⇒ StartsWith
Returns a new instance of StartsWith.
6 7 8 |
# File 'lib/quercle/operator/starts_with.rb', line 6 def initialize(value) @value = "#{value}%" end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/quercle/operator/starts_with.rb', line 4 def value @value end |
Instance Method Details
#sql_fragment ⇒ Object
10 11 12 |
# File 'lib/quercle/operator/starts_with.rb', line 10 def sql_fragment "like ?" end |