Module: Helpers::Configuration

Included in:
NoteFormatter::Formatter
Defined in:
lib/helpers/configuration.rb

Instance Method Summary collapse

Instance Method Details

#configObject



5
6
7
# File 'lib/helpers/configuration.rb', line 5

def config
  @config || YAML.load_file('configs.yml')
end

#f(key, format) ⇒ Object

format



20
21
22
# File 'lib/helpers/configuration.rb', line 20

def f(key, format)
  config[format][key]
end

#l(key, language = "pt-BR") ⇒ Object

localization



10
11
12
# File 'lib/helpers/configuration.rb', line 10

def l(key, language = "pt-BR")
  config["general"][language][key]
end

#m(key) ⇒ Object

markdown



15
16
17
# File 'lib/helpers/configuration.rb', line 15

def m(key)
  config["general"]["markdown"][key]
end