Class: Codebreaker::Winner
- Inherits:
-
Object
- Object
- Codebreaker::Winner
- Defined in:
- lib/codebreaker/winners.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(_user) ⇒ Winner
constructor
A new instance of Winner.
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_at ⇒ Object (readonly)
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/codebreaker/winners.rb', line 5 def created_at @created_at end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'lib/codebreaker/winners.rb', line 5 def user @user end |