Module: ActiveRecordPolyline::Compaction
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/active_record_polyline/compaction.rb,
lib/active_record_polyline/compaction/base.rb,
lib/active_record_polyline/compaction/random_compressor.rb,
lib/active_record_polyline/compaction/simple_compressor.rb,
lib/active_record_polyline/compaction/vector_compressor.rb
Defined Under Namespace
Classes: Base, RandomCompressor, SimpleCompressor, VectorCompressor
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.registry ⇒ Object
Returns the value of attribute registry.
15
16
17
|
# File 'lib/active_record_polyline/compaction.rb', line 15
def registry
@registry
end
|
Class Method Details
.default_compressor ⇒ Object
25
26
27
|
# File 'lib/active_record_polyline/compaction.rb', line 25
def default_compressor
@default_compressor ||= SimpleCompressor
end
|
.lookup(name) ⇒ Object
21
22
23
|
# File 'lib/active_record_polyline/compaction.rb', line 21
def lookup(name)
registry[name] || default_compressor
end
|
.register(name, klass = nil) ⇒ Object
17
18
19
|
# File 'lib/active_record_polyline/compaction.rb', line 17
def register(name, klass = nil)
registry[name] = klass
end
|