Class: ONIX::ONIX21::CodeFromYaml
- Defined in:
- lib/onix/onix21.rb
Overview
ONIX 2.1 codes
Direct Known Subclasses
EpubType, MediaFileFormatCode, MediaFileLinkTypeCode, MediaFileTypeCode, TextTypeCode
Instance Attribute Summary
Attributes inherited from Code
Attributes included from Attributes
Class Method Summary collapse
Methods inherited from Code
Methods included from CodeMethods
Methods inherited from Subset
parse, #parse, #tag_match, #unsupported
Methods included from Attributes
attribute_class, #parse_attributes, #serialized_attributes
Class Method Details
.code_ident ⇒ Object
46 47 48 |
# File 'lib/onix/onix21.rb', line 46 def self.code_ident nil end |
.hash ⇒ Object
38 39 40 |
# File 'lib/onix/onix21.rb', line 38 def self.hash @hash ||= YAML.load(File.open(File.dirname(__FILE__) + "/../../data/onix21/codelists/codelist-#{self.code_ident}.yml"))[:codelist].freeze end |
.list ⇒ Object
42 43 44 |
# File 'lib/onix/onix21.rb', line 42 def self.list self.hash.keys end |