Class: Guideline::Checker
- Inherits:
-
Object
- Object
- Guideline::Checker
show all
- Defined in:
- lib/guideline/checkers/checker.rb
Instance Method Summary
collapse
Constructor Details
#initialize(options = {}) ⇒ Checker
3
4
5
|
# File 'lib/guideline/checkers/checker.rb', line 3
def initialize(options = {})
@options = options
end
|
Instance Method Details
#errors ⇒ Object
7
8
9
|
# File 'lib/guideline/checkers/checker.rb', line 7
def errors
@errors ||= []
end
|
#has_error? ⇒ Boolean
20
21
22
|
# File 'lib/guideline/checkers/checker.rb', line 20
def has_error?
!errors.empty?
end
|
#report(options) ⇒ Object
11
12
13
14
15
16
17
18
|
# File 'lib/guideline/checkers/checker.rb', line 11
def report(options)
errors << Error.new(
:line => options[:line],
:message => options[:message],
:path => options[:path],
:name => name
)
end
|