class Cwsrb::Language::Type

The Type class represents a language type of ConWorkShop.

Attributes

code[R]

@return [String] The three-character type code.

desc[R]

@return [String] The description for the type.

Public Class Methods

new(code: '', desc: '') click to toggle source

Initializes a new Type instance with an options hash. @param code [String] The three-character type code. Defaults to an

empty string.

@param desc [String] The description for the type. Defaults to an

empty string.

@return [Type] A new instance of Type.

# File lib/cwsrb/data.rb, line 77
def initialize(code: '', desc: '')
  @code = code
  @desc = desc
end

Public Instance Methods

inspect() click to toggle source

@overload inspect

@return [String] A more meaningful output than that of the default
inspect method, with all of Type's attributes.
# File lib/cwsrb/data.rb, line 85
def inspect
  "<Language::Type code=#{@code} desc=#{@desc}>"
end