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.
13 14 15 |
# File 'lib/begin/config.rb', line 13 def initialize() @tags = end |
Instance Attribute Details
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
11 12 13 |
# File 'lib/begin/config.rb', line 11 def @tags end |
Class Method Details
.from_file(path) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/begin/config.rb', line 17 def self.from_file(path) if path.exists? config = YAML.load_file path = HashTag.from_config_hash(config) Config.new else {} end end |