Class: Codebreaker::Score

Inherits:
Struct
  • Object
show all
Defined in:
lib/codebreaker/score.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Score

Returns a new instance of Score.

Yields:

  • (_self)

Yield Parameters:



3
4
5
# File 'lib/codebreaker/score.rb', line 3

def initialize
  yield self if block_given?
end

Instance Attribute Details

#dateObject

Returns the value of attribute date

Returns:

  • (Object)

    the current value of date



2
3
4
# File 'lib/codebreaker/score.rb', line 2

def date
  @date
end

#levelObject

Returns the value of attribute level

Returns:

  • (Object)

    the current value of level



2
3
4
# File 'lib/codebreaker/score.rb', line 2

def level
  @level
end

#player_nameObject

Returns the value of attribute player_name

Returns:

  • (Object)

    the current value of player_name



2
3
4
# File 'lib/codebreaker/score.rb', line 2

def player_name
  @player_name
end

#scoreObject

Returns the value of attribute score

Returns:

  • (Object)

    the current value of score



2
3
4
# File 'lib/codebreaker/score.rb', line 2

def score
  @score
end

#winnerObject

Returns the value of attribute winner

Returns:

  • (Object)

    the current value of winner



2
3
4
# File 'lib/codebreaker/score.rb', line 2

def winner
  @winner
end