Module: Deadlyzer::Analyzer::Utils::InstanceMethods

Defined in:
lib/deadlyzer/analyzer/utils.rb

Instance Method Summary collapse

Instance Method Details

#default_config_fileObject

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.

Default name of config file

Since:

  • 0.1.0



22
23
24
# File 'lib/deadlyzer/analyzer/utils.rb', line 22

def default_config_file
  './deadlyzer.yml'
end

#parse_yaml(path) ⇒ Object

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.

Since:

  • 0.1.0



13
14
15
16
17
# File 'lib/deadlyzer/analyzer/utils.rb', line 13

def parse_yaml(path)
  ctx = read_file(path)

  YAML.load(ctx)
end

#read_file(path) ⇒ Object

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.

Since:

  • 0.1.0



28
29
30
# File 'lib/deadlyzer/analyzer/utils.rb', line 28

def read_file(path)
  File.read(File.expand_path(path))
end