Class: Vara::Linter
- Inherits:
-
Object
- Object
- Vara::Linter
- Defined in:
- lib/vara/linter.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata) ⇒ Linter
constructor
A new instance of Linter.
- #lint! ⇒ Object
Constructor Details
#initialize(metadata) ⇒ Linter
Returns a new instance of Linter.
9 10 11 12 |
# File 'lib/vara/linter.rb', line 9 def initialize() @metadata = @errors = [] end |
Class Method Details
.build(metadata_path) ⇒ Object
5 6 7 |
# File 'lib/vara/linter.rb', line 5 def self.build() new(YAML.load_file()) end |
Instance Method Details
#lint! ⇒ Object
14 15 16 17 |
# File 'lib/vara/linter.rb', line 14 def lint! raise LintError, errors.join("\n") unless errors.empty? end |