Class: Card

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rank, value, suit) ⇒ Card

Returns a new instance of Card.



27
28
29
30
31
# File 'lib/deck.rb', line 27

def initialize(rank, value, suit)
	@value = value
	@rank = rank
	@suit = suit
end

Instance Attribute Details

#rankObject (readonly)

Returns the value of attribute rank.



25
26
27
# File 'lib/deck.rb', line 25

def rank
  @rank
end

#suitObject (readonly)

Returns the value of attribute suit.



25
26
27
# File 'lib/deck.rb', line 25

def suit
  @suit
end

#valueObject (readonly)

Returns the value of attribute value.



25
26
27
# File 'lib/deck.rb', line 25

def value
  @value
end