Class: Cure::Configuration::Config
- Inherits:
-
Object
- Object
- Cure::Configuration::Config
- Defined in:
- lib/cure/config.rb
Overview
If we are overloading here as a “data store” and “config store”, we could break out variables and placeholders into their own singleton.
This should be a kind of instance cache, which loads once per run, and junk can be jammed in there?
Instance Attribute Summary collapse
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#source_file_location ⇒ Object
Returns the value of attribute source_file_location.
-
#template ⇒ Cure::Template
Template.
-
#variables ⇒ Hash
Variables.
Instance Method Summary collapse
-
#initialize(source_file_location, template, output_dir) ⇒ Config
constructor
A new instance of Config.
- #placeholders ⇒ Object
Constructor Details
#initialize(source_file_location, template, output_dir) ⇒ Config
Returns a new instance of Config.
47 48 49 50 51 |
# File 'lib/cure/config.rb', line 47 def initialize(source_file_location, template, output_dir) @source_file_location = source_file_location @template = template @output_dir = output_dir end |
Instance Attribute Details
#output_dir ⇒ Object
Returns the value of attribute output_dir.
36 37 38 |
# File 'lib/cure/config.rb', line 36 def output_dir @output_dir end |
#source_file_location ⇒ Object
Returns the value of attribute source_file_location.
36 37 38 |
# File 'lib/cure/config.rb', line 36 def source_file_location @source_file_location end |
#template ⇒ Cure::Template
Returns template.
39 40 41 |
# File 'lib/cure/config.rb', line 39 def template @template end |
#variables ⇒ Hash
Returns variables.
42 43 44 |
# File 'lib/cure/config.rb', line 42 def variables @variables end |
Instance Method Details
#placeholders ⇒ Object
53 54 55 |
# File 'lib/cure/config.rb', line 53 def placeholders @template.transformations.placeholders || {} end |