Module: RhnSatellite::Common::Debug::ClassMethods

Defined in:
lib/rhn_satellite/common/debug.rb

Instance Method Summary collapse

Instance Method Details

#debug(msg) ⇒ Object



29
30
31
# File 'lib/rhn_satellite/common/debug.rb', line 29

def debug(msg)
    output.puts msg if @debug_enabled
end

#debug_enabledObject



13
14
15
# File 'lib/rhn_satellite/common/debug.rb', line 13

def debug_enabled
    @debug_enabled ||= false
end

#debug_enabled=(enable) ⇒ Object



17
18
19
# File 'lib/rhn_satellite/common/debug.rb', line 17

def debug_enabled=(enable)
    @debug_enabled = enable
end

#outputObject



25
26
27
# File 'lib/rhn_satellite/common/debug.rb', line 25

def output
    @output ||= STDOUT
end

#output=(output) ⇒ Object



21
22
23
# File 'lib/rhn_satellite/common/debug.rb', line 21

def output=(output)
    @output = output
end