Module: Zippo::Filter::Base::ClassMethods
- Defined in:
- lib/zippo/filter/base.rb
Instance Method Summary collapse
Instance Method Details
#filters ⇒ Object
9 10 11 |
# File 'lib/zippo/filter/base.rb', line 9 def filters @filters_hash ||= Hash[@filters.map { |u| [u::METHOD, u] }] end |
#for(method) ⇒ Object
13 14 15 |
# File 'lib/zippo/filter/base.rb', line 13 def for(method) filters[method] or fail "unknown compression method #{method}" end |
#inherited(klass) ⇒ Object
17 18 19 20 |
# File 'lib/zippo/filter/base.rb', line 17 def inherited(klass) @filters_hash = nil @filters << klass end |