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.
82 83 84 85 |
# File 'lib/rubyosa/rbosa.rb', line 82 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.
80 81 82 |
# File 'lib/rubyosa/rbosa.rb', line 80 def code @code end |
#group_code ⇒ Object (readonly)
Returns the value of attribute group_code.
80 81 82 |
# File 'lib/rubyosa/rbosa.rb', line 80 def group_code @group_code end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
80 81 82 |
# File 'lib/rubyosa/rbosa.rb', line 80 def name @name end |
Class Method Details
.enum_for_code(code) ⇒ Object
87 88 89 |
# File 'lib/rubyosa/rbosa.rb', line 87 def self.enum_for_code(code) instances[code] end |
Instance Method Details
#inspect ⇒ Object
95 96 97 |
# File 'lib/rubyosa/rbosa.rb', line 95 def inspect "<#{@const}>" end |
#to_s ⇒ Object
91 92 93 |
# File 'lib/rubyosa/rbosa.rb', line 91 def to_s @name end |