Class: MemDB::Idx::Bytes
- Inherits:
-
Object
- Object
- MemDB::Idx::Bytes
- Includes:
- MemDB::Idx
- Defined in:
- lib/mem_db/idx/bytes.rb
Constant Summary
Constants included from MemDB::Idx
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
Instance Method Summary collapse
-
#initialize(field) ⇒ Bytes
constructor
A new instance of Bytes.
- #map_query(text) ⇒ Object
- #map_value(raw) ⇒ Object
Methods included from MemDB::Idx
#default, #default_any, #downcase, #prepare_query, #value
Constructor Details
#initialize(field) ⇒ Bytes
Returns a new instance of Bytes.
12 13 14 |
# File 'lib/mem_db/idx/bytes.rb', line 12 def initialize(field) @field = field end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
10 11 12 |
# File 'lib/mem_db/idx/bytes.rb', line 10 def field @field end |
Instance Method Details
#map_query(text) ⇒ Object
20 21 22 |
# File 'lib/mem_db/idx/bytes.rb', line 20 def map_query(text) text.bytes end |
#map_value(raw) ⇒ Object
16 17 18 |
# File 'lib/mem_db/idx/bytes.rb', line 16 def map_value(raw) raw.bytes end |