Class: ONIX::TextAttr

Inherits:
Object
  • Object
show all
Defined in:
lib/onix/subset.rb

Overview

String only code-like class

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code.



30
31
32
# File 'lib/onix/subset.rb', line 30

def code
  @code
end

#humanObject

Returns the value of attribute human.



30
31
32
# File 'lib/onix/subset.rb', line 30

def human
  @human
end

Class Method Details

.from_code(code) ⇒ Object



32
33
34
35
36
37
# File 'lib/onix/subset.rb', line 32

def self.from_code(code)
  obj = self.new
  obj.code = code
  obj.human = code
  obj
end