Class: StaticConfig::Aggregation::Merge
- Inherits:
-
Object
- Object
- StaticConfig::Aggregation::Merge
- Defined in:
- lib/static_config/aggregation/merge.rb
Instance Method Summary collapse
-
#initialize(readers) ⇒ Merge
constructor
A new instance of Merge.
- #read ⇒ Object
Constructor Details
#initialize(readers) ⇒ Merge
Returns a new instance of Merge.
4 5 6 |
# File 'lib/static_config/aggregation/merge.rb', line 4 def initialize(readers) @readers = readers end |
Instance Method Details
#read ⇒ Object
8 9 10 |
# File 'lib/static_config/aggregation/merge.rb', line 8 def read @readers.inject({}) { |res, reader| deep_merge res, reader.read } end |