Class: CodebreakerManflu::UserStatistics

Inherits:
ValidatableEntity
  • Object
show all
Includes:
Validator
Defined in:
lib/codebreker_manfly/entities/user_statistics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attemptsObject (readonly)

Returns the value of attribute attempts.



6
7
8
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6

def attempts
  @attempts
end

#dateObject (readonly)

Returns the value of attribute date.



6
7
8
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6

def date
  @date
end

#difficultyObject (readonly)

Returns the value of attribute difficulty.



6
7
8
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6

def difficulty
  @difficulty
end

#hintsObject (readonly)

Returns the value of attribute hints.



6
7
8
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6

def hints
  @hints
end

#userObject (readonly)

Returns the value of attribute user.



6
7
8
# File 'lib/codebreker_manfly/entities/user_statistics.rb', line 6

def user
  @user
end