Class: Fdlint::Rule::Validation::Runner
- Defined in:
- lib/fdlint/rule/validation.rb
Instance Method Summary collapse
- #error(msg, opt = {}) ⇒ Object
- #exec(node, source, file, parser, validate_block) {|results| ... } ⇒ Object
- #fatal(msg, opt = {}) ⇒ Object
- #results ⇒ Object
- #warn(msg, opt = {}) ⇒ Object
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
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 |
#results ⇒ Object
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 |