Class: Begin::Config
- Inherits:
-
Object
- Object
- Begin::Config
- Defined in:
- lib/begin/config.rb
Overview
The root-level template configuration structure. A class representation of the template config file (.begin.yml)
Instance Attribute Summary collapse
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tags) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(tags) ⇒ Config
Returns a new instance of Config.
11 12 13 |
# File 'lib/begin/config.rb', line 11 def initialize() = end |
Instance Attribute Details
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
9 10 11 |
# File 'lib/begin/config.rb', line 9 def end |
Class Method Details
.from_file(path) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/begin/config.rb', line 15 def self.from_file(path) if path.exists? config = YAML.load_file path = HashTag.from_config_hash(config) Config.new else {} end end |