Class: Washcloth::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/washcloth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



83
84
85
# File 'lib/washcloth.rb', line 83

def initialize
  @filters = {}
end

Instance Attribute Details

#filtersObject (readonly)

Returns the value of attribute filters.



81
82
83
# File 'lib/washcloth.rb', line 81

def filters
  @filters
end

Instance Method Details

#add_filter(filter_name, filter) ⇒ Object



87
88
89
# File 'lib/washcloth.rb', line 87

def add_filter(filter_name, filter)
  @filters[filter_name.to_sym] = Filter.new(name: filter_name.to_sym, filter:)
end