Class: Codebreaker::Winner

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_user) ⇒ Winner

Returns a new instance of Winner.



7
8
9
10
# File 'lib/codebreaker/winners.rb', line 7

def initialize(_user)
  @user = user
  @created_at = DateTime.now
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



5
6
7
# File 'lib/codebreaker/winners.rb', line 5

def created_at
  @created_at
end

#userObject (readonly)

Returns the value of attribute user.



5
6
7
# File 'lib/codebreaker/winners.rb', line 5

def user
  @user
end