Class: Referee::BuildOutput

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

Overview

Class providing an Xcode-parseable output mechanism.

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ BuildOutput



4
5
6
# File 'lib/referee/buildoutput.rb', line 4

def initialize(config)
  @config = config
end

Instance Method Details

#die(msg, status = 1) ⇒ Object

Outputs an error message and quits with an error status.



24
25
26
27
# File 'lib/referee/buildoutput.rb', line 24

def die(msg, status = 1)
  error msg
  Kernel.exit status
end

#error(msg) ⇒ Object

Outputs a message tagged as an error for Xcode.



19
20
21
# File 'lib/referee/buildoutput.rb', line 19

def error(msg)
  puts "error: #{msg}"
end

#info(msg) ⇒ Object

Outputs an informational message.



9
10
11
# File 'lib/referee/buildoutput.rb', line 9

def info(msg)
  puts msg if @config.verbose
end

#warn(msg) ⇒ Object

Outputs a message tagged as a warning for Xcode.



14
15
16
# File 'lib/referee/buildoutput.rb', line 14

def warn(msg)
  puts "warning: #{msg}"
end