Class: Rice::Doc::Config
- Inherits:
-
Object
- Object
- Rice::Doc::Config
- Defined in:
- lib/rice/doc/config.rb
Instance Attribute Summary collapse
-
#extension ⇒ Object
readonly
Returns the value of attribute extension.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#resolvers ⇒ Object
readonly
Returns the value of attribute resolvers.
Instance Method Summary collapse
-
#initialize(config_path) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(config_path) ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 13 14 |
# File 'lib/rice/doc/config.rb', line 8 def initialize(config_path) config = YAML.load_file(config_path) base_dir = File.dirname(config_path) @extension = File.(config['extension'], base_dir) @output = File.(config['output'], base_dir) @resolvers = build_resolvers(config['namespaces'] || {}) end |
Instance Attribute Details
#extension ⇒ Object (readonly)
Returns the value of attribute extension.
6 7 8 |
# File 'lib/rice/doc/config.rb', line 6 def extension @extension end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
6 7 8 |
# File 'lib/rice/doc/config.rb', line 6 def output @output end |
#resolvers ⇒ Object (readonly)
Returns the value of attribute resolvers.
6 7 8 |
# File 'lib/rice/doc/config.rb', line 6 def resolvers @resolvers end |