module BaseChip::TrackState::InstanceMethods
Public Instance Methods
error!( f,s)
click to toggle source
# File lib/base_chip/track_state.rb, line 34 def error!( f,s); np(f,s); @state = (@state =~ /fault/) ? 'error && fault' : 'error' end
error?()
click to toggle source
# File lib/base_chip/track_state.rb, line 39 def error? ; @state =~ /fault/ end
fault!( f,s)
click to toggle source
# File lib/base_chip/track_state.rb, line 35 def fault!( f,s); np(f,s); @state = (@state =~ /error/) ? 'error && fault' : 'fault' end
fault?()
click to toggle source
# File lib/base_chip/track_state.rb, line 40 def fault? ; @state =~ /error/ end
first_error()
click to toggle source
# File lib/base_chip/track_state.rb, line 56 def first_error ; @problem && @problem.to_s end
first_problem_file()
click to toggle source
# File lib/base_chip/track_state.rb, line 58 def first_problem_file ; @problem && @problem.file end
first_signature()
click to toggle source
# File lib/base_chip/track_state.rb, line 57 def first_signature ; @problem && @problem.signature end
np(file,signature)
click to toggle source
# File lib/base_chip/track_state.rb, line 42 def np(file,signature) return if @problem @problem = Problem.new @problem.file = file @problem.signature = signature @problem end
pass!()
click to toggle source
# File lib/base_chip/track_state.rb, line 32 def pass! ; @state ||= 'pass' end
pass?()
click to toggle source
# File lib/base_chip/track_state.rb, line 37 def pass? ; @state == 'pass' end
take_state(thing)
click to toggle source
# File lib/base_chip/track_state.rb, line 50 def take_state(thing) return if @problem @state = thing.state @problem = thing.problem end
warning!(f,s)
click to toggle source
# File lib/base_chip/track_state.rb, line 33 def warning!(f,s); np(f,s); @state = 'warning' if @state.nil? or @state.pass? end
warning?()
click to toggle source
# File lib/base_chip/track_state.rb, line 38 def warning? ; @state == 'warning' end