Class: Alula::Filter
- Inherits:
-
Object
- Object
- Alula::Filter
- Defined in:
- lib/alula/core_ext/filter.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #filters ⇒ Object
-
#initialize(options) ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
#initialize(options) ⇒ Filter
Returns a new instance of Filter.
14 15 16 |
# File 'lib/alula/core_ext/filter.rb', line 14 def initialize() @options = end |
Class Method Details
.filters ⇒ Object
4 |
# File 'lib/alula/core_ext/filter.rb', line 4 def self.filters; @@filters ||= {}; end |
.load(name, options) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/alula/core_ext/filter.rb', line 7 def self.load(name, ) if filters[name] filter = filters[name].new() return filter end end |
.register(name, klass) ⇒ Object
3 |
# File 'lib/alula/core_ext/filter.rb', line 3 def self.register(name, klass); filters[name.to_s] = klass; end |
Instance Method Details
#filters ⇒ Object
5 |
# File 'lib/alula/core_ext/filter.rb', line 5 def filters; self.class.filters; end |