Class: IsoDoc::Generic::I18n

Inherits:
I18n
  • Object
show all
Includes:
Utils
Defined in:
lib/isodoc/generic/i18n.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils

#baselocation, #configuration, #fileloc

Class Attribute Details

._fileObject

Returns the value of attribute _file.



7
8
9
# File 'lib/isodoc/generic/i18n.rb', line 7

def _file
  @_file
end

Class Method Details

.inherited(k) ⇒ Object



10
11
12
# File 'lib/isodoc/generic/i18n.rb', line 10

def self.inherited( k )
  k._file = caller_locations.first.absolute_path
end

Instance Method Details

#load_yaml1(lang, script) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/isodoc/generic/i18n.rb', line 14

def load_yaml1(lang, script)
  return super unless configuration.i18nyaml
  file = configuration.i18nyaml.is_a?(Hash) ?
    configuration.i18nyaml[lang] : configuration.i18nyaml
  return super if file.nil?
  y = YAML.load_file(baselocation(file))
  super.merge(y)
end