Class: FindMostActiveReader

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(library) ⇒ FindMostActiveReader

Returns a new instance of FindMostActiveReader.



5
6
7
8
9
# File 'lib/find_most_active_reader.rb', line 5

def initialize(library)
  @library = library
  @max_taken_books_num = 0
  @most_active_reader = nil
end

Instance Attribute Details

#max_taken_books_numObject (readonly)

Returns the value of attribute max_taken_books_num.



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

def max_taken_books_num
  @max_taken_books_num
end

#most_active_readerObject (readonly)

Returns the value of attribute most_active_reader.



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

def most_active_reader
  @most_active_reader
end

Instance Method Details

#performObject



11
12
13
14
# File 'lib/find_most_active_reader.rb', line 11

def perform
  find_the_most_active_reader
  self
end