Class: AreWeThereYet::ProfilerUI

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

Defined Under Namespace

Classes: UnknownListingError

Class Method Summary collapse

Class Method Details

.get_profiler_output(location, output, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/are_we_there_yet/profiler_ui.rb', line 4

def self.get_profiler_output(location, output, options={})
  profiler = Profiler.new(location)
  if options[:list] == 'files'
    output.write(Formatter.format_for_output(profiler.list_files))
  elsif options[:list] == 'examples'
    output.write(Formatter.format_for_output(profiler.list_examples(options[:file_path])))
  else
    raise UnknownListingError
  end
end