Class: Dip::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/dip/config.rb

Constant Summary collapse

DEFAULT_PATH =
"dip.yml"

Instance Method Summary collapse

Constructor Details

#initializeConfig

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

Returns:

  • (Boolean)


14
15
16
# File 'lib/dip/config.rb', line 14

def exist?
  File.exist?(@path)
end

#to_hObject



24
25
26
# File 'lib/dip/config.rb', line 24

def to_h
  config
end