class FiftyTwo::Suit

Constants

ALL

Attributes

code[R]
color[R]
name[R]
symbol[R]

Public Class Methods

new(name, color, symbol = nil) click to toggle source
# File lib/fiftytwo/suit.rb, line 12
def initialize(name, color, symbol = nil)
  @name = name
  @color = color
  @symbol = symbol
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/fiftytwo/suit.rb, line 33
def <=>(other)
  name <=> other.name
end
identifier() click to toggle source
# File lib/fiftytwo/suit.rb, line 41
def identifier
  name[0].upcase
end
to_s() click to toggle source
# File lib/fiftytwo/suit.rb, line 37
def to_s
  name.titleize
end