class ONIX::CodeFromYaml
Public Class Methods
code_ident()
click to toggle source
# File lib/onix/code.rb, line 80 def self.code_ident nil end
code_identifier(code)
click to toggle source
# File lib/onix/code.rb, line 84 def self.code_identifier code define_singleton_method :code_ident do return code end end
codelist_filename()
click to toggle source
# File lib/onix/code.rb, line 68 def self.codelist_filename File.dirname(__FILE__) + "/../../data/codelists/codelist-#{self.code_ident}.yml" end
hash()
click to toggle source
# File lib/onix/code.rb, line 72 def self.hash @hash ||= YAML.load(File.open(codelist_filename))[:codelist] end
list()
click to toggle source
# File lib/onix/code.rb, line 76 def self.list self.hash.to_a.map { |h| h.first } end