Class: Fdlint::Rule::Validation::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/fdlint/rule/validation.rb

Instance Method Summary collapse

Instance Method Details

#error(msg, opt = {}) ⇒ Object



67
68
69
# File 'lib/fdlint/rule/validation.rb', line 67

def error( msg, opt={} )
  results << [msg, :error, opt]
end

#exec(node, source, file, parser, validate_block) {|results| ... } ⇒ Object

Yields:



54
55
56
57
# File 'lib/fdlint/rule/validation.rb', line 54

def exec( node, source, file, parser, validate_block, &block )
  instance_exec( node, source, file, parser, &validate_block ) 
  yield results if block_given?
end

#fatal(msg, opt = {}) ⇒ Object



63
64
65
# File 'lib/fdlint/rule/validation.rb', line 63

def fatal( msg, opt={} )
  results << [msg, :fatal, opt]
end

#resultsObject



59
60
61
# File 'lib/fdlint/rule/validation.rb', line 59

def results
  @results ||= []
end

#warn(msg, opt = {}) ⇒ Object



71
72
73
# File 'lib/fdlint/rule/validation.rb', line 71

def warn( msg, opt={} )
  results << [msg, :warn, opt]
end