Class: Cwsrb::Language::Type
- Inherits:
-
Object
- Object
- Cwsrb::Language::Type
- Defined in:
- lib/cwsrb/data.rb
Overview
The Type class represents a language type of ConWorkShop.
Instance Attribute Summary collapse
-
#code ⇒ String
readonly
The three-character type code.
-
#desc ⇒ String
readonly
The description for the type.
Instance Method Summary collapse
-
#initialize(code: '', desc: '') ⇒ Type
constructor
Initializes a new Type instance with an options hash.
-
#inspect ⇒ String
inspect method, with all of Type's attributes.
Constructor Details
#initialize(code: '', desc: '') ⇒ Type
Initializes a new Type instance with an options hash.
77 78 79 80 |
# File 'lib/cwsrb/data.rb', line 77 def initialize(code: '', desc: '') @code = code @desc = desc end |
Instance Attribute Details
#code ⇒ String (readonly)
Returns The three-character type code.
66 67 68 |
# File 'lib/cwsrb/data.rb', line 66 def code @code end |
#desc ⇒ String (readonly)
Returns The description for the type.
69 70 71 |
# File 'lib/cwsrb/data.rb', line 69 def desc @desc end |
Instance Method Details
#inspect ⇒ String
85 86 87 |
# File 'lib/cwsrb/data.rb', line 85 def inspect "<Language::Type code=#{@code} desc=#{@desc}>" end |