Class: OSA::Enumerator
- Inherits:
-
Object
- Object
- OSA::Enumerator
- Defined in:
- lib/rubyosa/rbosa.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#group_code ⇒ Object
readonly
Returns the value of attribute group_code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(const, name, code, group_code) ⇒ Enumerator
constructor
A new instance of Enumerator.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(const, name, code, group_code) ⇒ Enumerator
Returns a new instance of Enumerator.
80 81 82 83 |
# File 'lib/rubyosa/rbosa.rb', line 80 def initialize(const, name, code, group_code) @const, @name, @code, @group_code = const, name, code, group_code self.class.instances[code] = self end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
78 79 80 |
# File 'lib/rubyosa/rbosa.rb', line 78 def code @code end |
#group_code ⇒ Object (readonly)
Returns the value of attribute group_code.
78 79 80 |
# File 'lib/rubyosa/rbosa.rb', line 78 def group_code @group_code end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
78 79 80 |
# File 'lib/rubyosa/rbosa.rb', line 78 def name @name end |
Class Method Details
.enum_for_code(code) ⇒ Object
85 86 87 |
# File 'lib/rubyosa/rbosa.rb', line 85 def self.enum_for_code(code) instances[code] end |
Instance Method Details
#inspect ⇒ Object
93 94 95 |
# File 'lib/rubyosa/rbosa.rb', line 93 def inspect "<#{@const}>" end |
#to_s ⇒ Object
89 90 91 |
# File 'lib/rubyosa/rbosa.rb', line 89 def to_s @name end |