Class: Dip::Config
- Inherits:
-
Object
- Object
- Dip::Config
- Defined in:
- lib/dip/config.rb
Constant Summary collapse
- DEFAULT_PATH =
"dip.yml"
Instance Method Summary collapse
- #exist? ⇒ Boolean
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
10 11 12 |
# File 'lib/dip/config.rb', line 10 def initialize @path = ENV["DIP_FILE"] || File.join(Dir.pwd, DEFAULT_PATH) end |
Instance Method Details
#exist? ⇒ Boolean
14 15 16 |
# File 'lib/dip/config.rb', line 14 def exist? File.exist?(@path) end |
#to_h ⇒ Object
24 25 26 |
# File 'lib/dip/config.rb', line 24 def to_h config end |