Class: Mwc::Config
Overview
The compile preferences
Constant Summary collapse
- LOCK =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Mutex.new
Instance Attribute Summary collapse
- #default ⇒ Object readonly private
Instance Method Summary collapse
-
#exist? ⇒ TrueClass, FalseClass
private
Check config file exists.
-
#initialize(path = Mwc.root.join('.mwcrc')) ⇒ Config
constructor
:nodoc:.
-
#reload ⇒ Object
private
Reload config.
Constructor Details
#initialize(path = Mwc.root.join('.mwcrc')) ⇒ Config
:nodoc:
26 27 28 29 30 |
# File 'lib/mwc/config.rb', line 26 def initialize(path = Mwc.root.join('.mwcrc')) @path = Pathname.new(path) @default = Environment.new load_config if exist? end |
Instance Attribute Details
#default ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/mwc/config.rb', line 23 def default @default end |
Instance Method Details
#exist? ⇒ TrueClass, FalseClass
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check config file exists
38 39 40 |
# File 'lib/mwc/config.rb', line 38 def exist? @path.exist? end |