Class: Stat
Instance Attribute Summary collapse
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#files_current ⇒ Object
Returns the value of attribute files_current.
-
#files_total ⇒ Object
Returns the value of attribute files_total.
-
#flush_counter ⇒ Object
Returns the value of attribute flush_counter.
-
#success ⇒ Object
Returns the value of attribute success.
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize ⇒ Stat
constructor
A new instance of Stat.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Stat
Returns a new instance of Stat.
5 6 7 |
# File 'lib/rforward/stat.rb', line 5 def initialize @success, @failed, @total, @files_total, @files_current, @flush_counter = 0, 0, 0, 0, 0, 0 end |
Instance Attribute Details
#failed ⇒ Object
Returns the value of attribute failed.
3 4 5 |
# File 'lib/rforward/stat.rb', line 3 def failed @failed end |
#files_current ⇒ Object
Returns the value of attribute files_current.
3 4 5 |
# File 'lib/rforward/stat.rb', line 3 def files_current @files_current end |
#files_total ⇒ Object
Returns the value of attribute files_total.
3 4 5 |
# File 'lib/rforward/stat.rb', line 3 def files_total @files_total end |
#flush_counter ⇒ Object
Returns the value of attribute flush_counter.
3 4 5 |
# File 'lib/rforward/stat.rb', line 3 def flush_counter @flush_counter end |
#success ⇒ Object
Returns the value of attribute success.
3 4 5 |
# File 'lib/rforward/stat.rb', line 3 def success @success end |
#total ⇒ Object
Returns the value of attribute total.
3 4 5 |
# File 'lib/rforward/stat.rb', line 3 def total @total end |
Instance Method Details
#to_s ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/rforward/stat.rb', line 9 def to_s text = [] text << "[STAT]" text << "[total: #{total}] [success: #{success}] [failed #{failed}]" text << "[file current #{files_current}] [files total #{files_total}]" text << "[STAT]" text.join "\n" end |