Class: Cwsrb::Language::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/cwsrb/data.rb

Overview

The Language::Type class represents a language status of ConWorkShop.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code: '', desc: '') ⇒ Status

Initializes a new Status instance with an options hash.

Parameters:

  • code (String) (defaults to: '')

    The one-character status code. Defaults to an empty string.

  • desc (String) (defaults to: '')

    The description for the status. Defaults to an empty string.


103
104
105
106
# File 'lib/cwsrb/data.rb', line 103

def initialize(code: '', desc: '')
  @code = code
  @desc = desc
end

Instance Attribute Details

#codeString (readonly)

Returns The one-character status code.

Returns:

  • (String)

    The one-character status code.


93
94
95
# File 'lib/cwsrb/data.rb', line 93

def code
  @code
end

#descString (readonly)

Returns The description for the status.

Returns:

  • (String)

    The description for the status.


96
97
98
# File 'lib/cwsrb/data.rb', line 96

def desc
  @desc
end

Instance Method Details

#inspectString

inspect method, with all of Status' attributes.

Returns:

  • (String)

    A more meaningful output than that of the default


111
112
113
# File 'lib/cwsrb/data.rb', line 111

def inspect
  "<Language::Status code=#{@code} desc=#{@desc}>"
end