Class: ODDB::SimpleLanguage::Descriptions

Inherits:
Hash show all
Includes:
OddbYaml
Defined in:
ext/export/src/oddb_yaml.rb,
src/util/language.rb

Overview

< Hash

Direct Known Subclasses

Language::Descriptions

Constant Summary

Constants included from OddbYaml

EXPORT_PROPERTIES, YAML_URI

Instance Method Summary (collapse)

Methods included from OddbYaml

#to_yaml_properties, #to_yaml_type

Methods inherited from Hash

#obj_path

Instance Method Details

- (Object) first



19
20
21
22
23
24
25
# File 'src/util/language.rb', line 19

def first
  if empty?
    ''
  else
    sort.first.last
  end
end

- (Object) to_hash

mostly for testing purposes…



10
11
12
13
14
15
# File 'src/util/language.rb', line 10

def to_hash 
  inject({}) { |inj, pair|
    inj.store(*pair)
    inj
  }
end

- (Object) update_values(values, origin = nil)



16
17
18
# File 'src/util/language.rb', line 16

def update_values(values, origin=nil)
  update(values)
end