Class: ConfigMapper::ConfigList::Factory
- Inherits:
-
Object
- Object
- ConfigMapper::ConfigList::Factory
- Defined in:
- lib/config_mapper/config_list.rb
Instance Attribute Summary collapse
-
#entry_factory ⇒ Object
readonly
Returns the value of attribute entry_factory.
Instance Method Summary collapse
- #config_doc ⇒ Object
-
#initialize(entry_factory) ⇒ Factory
constructor
A new instance of Factory.
- #new ⇒ Object
Constructor Details
#initialize(entry_factory) ⇒ Factory
Returns a new instance of Factory.
14 15 16 |
# File 'lib/config_mapper/config_list.rb', line 14 def initialize(entry_factory) @entry_factory = ConfigMapper::Factory.resolve(entry_factory) end |
Instance Attribute Details
#entry_factory ⇒ Object (readonly)
Returns the value of attribute entry_factory.
18 19 20 |
# File 'lib/config_mapper/config_list.rb', line 18 def entry_factory @entry_factory end |
Instance Method Details
#config_doc ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/config_mapper/config_list.rb', line 24 def config_doc return {} unless entry_factory.respond_to?(:config_doc) {}.tap do |result| entry_factory.config_doc.each do |path, doc| result["[N]#{path}"] = doc end end end |
#new ⇒ Object
20 21 22 |
# File 'lib/config_mapper/config_list.rb', line 20 def new ConfigList.new(@entry_factory) end |