Class: CodebreakerManflu::UserStatistics
- Inherits:
-
ValidatableEntity
- Object
- ValidatableEntity
- CodebreakerManflu::UserStatistics
- Includes:
- Validator
- Defined in:
- lib/codebreker_manfly/entities/user_statistics.rb
Instance Attribute Summary collapse
-
#attempts ⇒ Object
readonly
Returns the value of attribute attempts.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#difficulty ⇒ Object
readonly
Returns the value of attribute difficulty.
-
#hints ⇒ Object
readonly
Returns the value of attribute hints.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user:, difficulty:, attempts:, hints:) ⇒ UserStatistics
constructor
A new instance of UserStatistics.
Constructor Details
#initialize(user:, difficulty:, attempts:, hints:) ⇒ UserStatistics
Returns a new instance of UserStatistics.
8 9 10 11 12 13 14 15 |
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 8 def initialize(user:, difficulty:, attempts:, hints:) super() @user = user @difficulty = difficulty @attempts = attempts @hints = hints @date = DateTime.now end |
Instance Attribute Details
#attempts ⇒ Object (readonly)
Returns the value of attribute attempts.
6 7 8 |
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6 def attempts @attempts end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
6 7 8 |
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6 def date @date end |
#difficulty ⇒ Object (readonly)
Returns the value of attribute difficulty.
6 7 8 |
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6 def difficulty @difficulty end |
#hints ⇒ Object (readonly)
Returns the value of attribute hints.
6 7 8 |
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6 def hints @hints end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
6 7 8 |
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6 def user @user end |