Class: Quercle::Operator::StartsWith

Inherits:
Object
  • Object
show all
Defined in:
lib/quercle/operator/starts_with.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#valueObject

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_fragmentObject



10
11
12
# File 'lib/quercle/operator/starts_with.rb', line 10

def sql_fragment
  "like ?"
end