Class: Giblish::Configurator
- Inherits:
-
Object
- Object
- Giblish::Configurator
- Defined in:
- lib/giblish/configurator.rb
Overview
AIDEV-NOTE: Assembles configuration from specialized builders following composition pattern
Direct Known Subclasses
Instance Attribute Summary collapse
-
#build_options ⇒ Hash
readonly
Build options for TreeConverter.
-
#config_opts ⇒ CmdLine::Options
readonly
User configuration options.
-
#doc_attr ⇒ DocAttrBuilder
readonly
Document attribute builder.
Instance Method Summary collapse
-
#initialize(config_opts) ⇒ Configurator
constructor
Creates configuration by assembling layout, DocId, and index configurations.
Constructor Details
#initialize(config_opts) ⇒ Configurator
Creates configuration by assembling layout, DocId, and index configurations.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/giblish/configurator.rb', line 25 def initialize(config_opts) @config_opts = config_opts @resource_paths = ResourcePaths.new(config_opts) # Build layout configuration layout_config = build_layout_config(config_opts) # Initialize doc attribute builder @doc_attr = DocAttrBuilder.new( GiblishDefaultDocAttribs.new, *layout_config.docattr_providers, CmdLineDocAttribs.new(config_opts) ) # Build feature configurations docid_config = DocIdConfigBuilder.build(config_opts) index_config = build_index_config(config_opts) # Assemble final build options = (layout_config, docid_config, index_config, config_opts) end |
Instance Attribute Details
#build_options ⇒ Hash (readonly)
Returns Build options for TreeConverter.
14 15 16 |
# File 'lib/giblish/configurator.rb', line 14 def end |
#config_opts ⇒ CmdLine::Options (readonly)
Returns User configuration options.
20 21 22 |
# File 'lib/giblish/configurator.rb', line 20 def config_opts @config_opts end |
#doc_attr ⇒ DocAttrBuilder (readonly)
Returns Document attribute builder.
17 18 19 |
# File 'lib/giblish/configurator.rb', line 17 def doc_attr @doc_attr end |