Class: LocationsNg::LoadFile

Inherits:
Object
  • Object
show all
Defined in:
lib/locations_ng/load_file.rb

Class Method Summary collapse

Class Method Details

.files_location(file) ⇒ Object



8
9
10
# File 'lib/locations_ng/load_file.rb', line 8

def files_location(file)
  File.expand_path("../locations/#{file}.yml", __FILE__)
end

.read(file_name) ⇒ Object



4
5
6
# File 'lib/locations_ng/load_file.rb', line 4

def read(file_name)
  YAML.load(File.read(files_location file_name))
end