Class: Serega::SeregaPlugins::Formatters::FormattersConfig
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::Formatters::FormattersConfig
- Defined in:
- lib/serega/plugins/formatters/formatters.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
- #add(formatters) ⇒ Object
-
#initialize(opts) ⇒ FormattersConfig
constructor
A new instance of FormattersConfig.
Constructor Details
#initialize(opts) ⇒ FormattersConfig
Returns a new instance of FormattersConfig.
24 25 26 |
# File 'lib/serega/plugins/formatters/formatters.rb', line 24 def initialize(opts) @opts = opts end |
Instance Attribute Details
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
22 23 24 |
# File 'lib/serega/plugins/formatters/formatters.rb', line 22 def opts @opts end |
Instance Method Details
#add(formatters) ⇒ Object
28 29 30 31 32 |
# File 'lib/serega/plugins/formatters/formatters.rb', line 28 def add(formatters) formatters.each_pair do |key, value| opts[key] = value end end |