Class: Dome::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/dome/settings.rb

Instance Method Summary collapse

Instance Method Details

#itv_yaml_pathObject



12
13
14
# File 'lib/dome/settings.rb', line 12

def itv_yaml_path
  '../../../itv.yaml'
end

#load_yamlObject



8
9
10
# File 'lib/dome/settings.rb', line 8

def load_yaml
  @parsed_yaml ||= YAML.load_file(itv_yaml_path)
end

#parseObject



3
4
5
6
# File 'lib/dome/settings.rb', line 3

def parse
  raise('[*] itv.yaml does not exist') unless File.exist? itv_yaml_path
  load_yaml
end

#project_rootObject



16
17
18
# File 'lib/dome/settings.rb', line 16

def project_root
  File.realpath(File.dirname(itv_yaml_path))
end