Class: Nitra::Formatter
- Inherits:
-
Object
- Object
- Nitra::Formatter
- Defined in:
- lib/nitra/formatter.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#progress ⇒ Object
Returns the value of attribute progress.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
Instance Method Summary collapse
- #finish ⇒ Object
-
#initialize(progress, configuration) ⇒ Formatter
constructor
A new instance of Formatter.
- #print_progress ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(progress, configuration) ⇒ Formatter
Returns a new instance of Formatter.
8 9 10 11 |
# File 'lib/nitra/formatter.rb', line 8 def initialize(progress, configuration) self.progress = progress self.configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
6 7 8 |
# File 'lib/nitra/formatter.rb', line 6 def configuration @configuration end |
#progress ⇒ Object
Returns the value of attribute progress.
6 7 8 |
# File 'lib/nitra/formatter.rb', line 6 def progress @progress end |
#start_time ⇒ Object
Returns the value of attribute start_time.
6 7 8 |
# File 'lib/nitra/formatter.rb', line 6 def start_time @start_time end |
Instance Method Details
#finish ⇒ Object
23 24 25 26 27 28 |
# File 'lib/nitra/formatter.rb', line 23 def finish puts progress.filtered_output puts "\n#{overview}" puts "#{$aborted ? "Aborted after" : "Finished in"} #{"%0.1f" % (Time.now-start_time)} seconds" end |
#print_progress ⇒ Object
18 19 20 21 |
# File 'lib/nitra/formatter.rb', line 18 def print_progress print_failures end |
#start ⇒ Object
13 14 15 16 |
# File 'lib/nitra/formatter.rb', line 13 def start self.start_time = Time.now print_progress end |