Class: Afterlife::Repo::Provider
- Inherits:
-
Object
- Object
- Afterlife::Repo::Provider
- Defined in:
- lib/afterlife/repo/provider.rb
Overview
Reads (and builds) the .afterlife.yml file in the repo
Constant Summary collapse
- CONFIG_NAME =
'.afterlife.yml'
Instance Attribute Summary collapse
-
#full_path ⇒ Object
readonly
Returns the value of attribute full_path.
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(full_path) ⇒ Provider
constructor
A new instance of Provider.
Constructor Details
#initialize(full_path) ⇒ Provider
Returns a new instance of Provider.
11 12 13 |
# File 'lib/afterlife/repo/provider.rb', line 11 def initialize(full_path) @full_path = full_path end |
Instance Attribute Details
#full_path ⇒ Object (readonly)
Returns the value of attribute full_path.
9 10 11 |
# File 'lib/afterlife/repo/provider.rb', line 9 def full_path @full_path end |
Instance Method Details
#config ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/afterlife/repo/provider.rb', line 15 def config return @config if defined?(@config) if config_file.exist? @config = base_config @config = deep_merge(parent, base_config) if parent end @config ||= {} end |