Module: BlaBla

Defined in:
lib/blabla.rb,
lib/version.rb,
lib/generators/cpf.rb,
lib/utilities/util.rb,
lib/generators/cnpj.rb,
lib/generators/pessoa.rb,
lib/generators/texto/base.rb,
lib/generators/texto/bacon.rb,
lib/generators/texto/lorem.rb,
lib/generators/cartao_credito.rb

Defined Under Namespace

Modules: Texto Classes: Bacon, CNPJ, CPF, CartaoCredito, Lorem, Pessoa, Util

Constant Summary collapse

VERSION =
"0.0.2".freeze
@@strings =
nil

Class Method Summary collapse

Class Method Details

.root_dirObject



6
7
8
# File 'lib/blabla.rb', line 6

def self.root_dir
  File.expand_path(File.dirname(File.expand_path(__FILE__)) + "/..")
end

.strings(key = nil) ⇒ Object



14
15
16
17
# File 'lib/blabla.rb', line 14

def self.strings key=nil
  @@strings ||= YAML.load_file(strings_file)["blabla"]
  parse_string_key key
end

.strings_fileObject



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

def self.strings_file
  File.join(root_dir, "lib", "strings", "strings.yml")
end