Module: Deckstrings::Enum

Included in:
Format, HeroClass
Defined in:
lib/deckstrings/enum.rb

Instance Method Summary collapse

Instance Method Details

#symbolSymbol

Returns The unique symbol for this enum instance.

Returns:

  • (Symbol)

    The unique symbol for this enum instance.



38
39
40
# File 'lib/deckstrings/enum.rb', line 38

def symbol
  @symbol
end

#to_sString

Returns A string description of this enum instance.

Returns:

  • (String)

    A string description of this enum instance.



33
34
35
# File 'lib/deckstrings/enum.rb', line 33

def to_s
  @display || @symbol.to_s
end

#valueInteger, ...

Returns The parseable value for this enum instance.

Returns:

  • (Integer, String, Object)

    The parseable value for this enum instance.



43
44
45
# File 'lib/deckstrings/enum.rb', line 43

def value
  @value
end