Module: ONIX::CodeMethods

Included in:
Code
Defined in:
lib/onix/code.rb

Instance Method Summary collapse

Instance Method Details

#humanString

Humanized string code

Returns:

  • (String)


16
17
18
# File 'lib/onix/code.rb', line 16

def human
  @human
end

#onixString

ONIX code

Returns:

  • (String)


22
23
24
# File 'lib/onix/code.rb', line 22

def onix
  @code
end

#parse(n) ⇒ Object



8
9
10
11
12
# File 'lib/onix/code.rb', line 8

def parse(n)
  parse_attributes(n.attributes)
  @code = n.text
  @human = self.class.hash[n.text]
end