Class: Quandl::Lang

Inherits:
Object
  • Object
show all
Defined in:
lib/quandl/lang.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ Lang

Returns a new instance of Lang.



16
17
18
# File 'lib/quandl/lang.rb', line 16

def initialize(file)
  self.file = file
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



14
15
16
# File 'lib/quandl/lang.rb', line 14

def data
  @data
end

#fileObject

Returns the value of attribute file.



14
15
16
# File 'lib/quandl/lang.rb', line 14

def file
  @file
end

Class Method Details

.enObject



7
8
9
10
# File 'lib/quandl/lang.rb', line 7

def en
  @en ||= self.new( File.join(Quandl::Command.root, 'config/locales/en.yml') )
  @en.data
end

Instance Method Details

#load_fileObject



24
25
26
# File 'lib/quandl/lang.rb', line 24

def load_file
  YAML.load( File.read( file ) )
end