Class: Kintama::Reporter

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

Defined Under Namespace

Classes: Base, Inline, Verbose

Class Method Summary collapse

Class Method Details

.called(name) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/kintama/reporter.rb', line 9

def self.called(name)
  case name.to_s
  when /verbose/i
    default
  when /inline/i
    Inline.new
  else
    default
  end
end

.defaultObject



4
5
6
7
# File 'lib/kintama/reporter.rb', line 4

def self.default
  colour = $stdin.tty?
  Verbose.new(colour)
end