Class: GoogleFontUrl::Utils

Inherits:
Object
  • Object
show all
Defined in:
lib/google_font_url/utils.rb

Constant Summary collapse

DATA_PATH =
File.expand_path("../../../data/fonts_data.yml", __FILE__)

Class Method Summary collapse

Class Method Details

.read_fontsObject



9
10
11
12
13
14
# File 'lib/google_font_url/utils.rb', line 9

def self.read_fonts
  unless File.exist?(DATA_PATH)
    raise "Data file not found: #{DATA_PATH}"
  end
  YAML.safe_load(File.read(DATA_PATH))
end