Class: MemDB::Field::Downcase

Inherits:
Object
  • Object
show all
Includes:
MemDB::Field
Defined in:
lib/mem_db/field/downcase.rb

Instance Method Summary collapse

Methods included from MemDB::Field

#downcase, #may_missing, #negative, #query

Constructor Details

#initialize(original) ⇒ Downcase

Returns a new instance of Downcase.



11
12
13
# File 'lib/mem_db/field/downcase.rb', line 11

def initialize(original)
  @original = original
end

Instance Method Details

#fieldObject



15
16
17
# File 'lib/mem_db/field/downcase.rb', line 15

def field
  @original.field
end

#field_value(obj) ⇒ Object



27
28
29
# File 'lib/mem_db/field/downcase.rb', line 27

def field_value(obj)
  @original.field_value(obj).map(&:downcase)
end

#new_matching(value) ⇒ Object



23
24
25
# File 'lib/mem_db/field/downcase.rb', line 23

def new_matching(value)
  @original.new_matching(value)
end

#prepare_query(obj) ⇒ Object



31
32
33
# File 'lib/mem_db/field/downcase.rb', line 31

def prepare_query(obj)
  @original.prepare_query(obj).map(&:downcase)
end

#query_fieldObject



19
20
21
# File 'lib/mem_db/field/downcase.rb', line 19

def query_field
  @original.query_field
end