Class: MboxMerge::Statistics

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_count, email_count) ⇒ Statistics

Initializes the statistics for the merge process

Parameters:

  • file_count (Integer)

    The number of mbox files merged

  • email_count (Integer)

    The total number of emails merged



72
73
74
75
# File 'lib/mbox_merge.rb', line 72

def initialize(file_count, email_count)
    @file_count = file_count
    @email_count = email_count
end

Instance Attribute Details

#email_countObject (readonly)

Returns the value of attribute email_count.



66
67
68
# File 'lib/mbox_merge.rb', line 66

def email_count
  @email_count
end

#file_countObject (readonly)

Returns the value of attribute file_count.



66
67
68
# File 'lib/mbox_merge.rb', line 66

def file_count
  @file_count
end

Instance Method Details

This method returns an undefined value.

Prints the statistics to the console



80
81
82
83
84
# File 'lib/mbox_merge.rb', line 80

def print_statistics
    puts "Merging mbox files completed!"
    puts "Total Mbox Files: #{@file_count}"
    puts "Total Emails Merged: #{@email_count}"
end