Class: Serega::SeregaPlugins::Formatters::FormattersConfig
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::Formatters::FormattersConfig
- Defined in:
- lib/serega/plugins/formatters/formatters.rb
Overview
Formatters plugin config
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#add(formatters) ⇒ void
Adds new formatters.
-
#initialize(opts) ⇒ Object
constructor
Initializes formatters config object.
Constructor Details
#initialize(opts) ⇒ Object
Initializes formatters config object
98 99 100 |
# File 'lib/serega/plugins/formatters/formatters.rb', line 98 def initialize(opts) @opts = opts end |
Instance Attribute Details
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
90 91 92 |
# File 'lib/serega/plugins/formatters/formatters.rb', line 90 def opts @opts end |
Instance Method Details
#add(formatters) ⇒ void
This method returns an undefined value.
Adds new formatters
108 109 110 111 112 |
# File 'lib/serega/plugins/formatters/formatters.rb', line 108 def add(formatters) formatters.each_pair do |key, value| opts[key] = value end end |