class NeofugoClient::Card

Constants

MARK_TO_VALUE

Attributes

mark[RW]
type[RW]
value[RW]

Public Class Methods

to_card(e) click to toggle source
# File lib/neofugo_client.rb, line 65
def to_card(e)
  c = Card.new
  if e == 'JK'
    c.type = 'JK'
    c.mark = nil
    c.value = MARK_TO_VALUE['JK']
  else
    c.type = e[0]
    c.mark = e[1]
    #p [:mark_to_value, e[1], MARK_TO_VALUE[e[1]], MARK_TO_VALUE]
    c.value = MARK_TO_VALUE[e[1]]
  end
  c
end

Public Instance Methods

inspect() click to toggle source
# File lib/neofugo_client.rb, line 60
def inspect
  [@type, @mark, ["(", @value, ")"].join].join
end
to_card_string() click to toggle source
# File lib/neofugo_client.rb, line 52
def to_card_string
  [@type, @mark].join
end
to_s() click to toggle source
# File lib/neofugo_client.rb, line 56
def to_s
  inspect
end