Class: Vara::Linter

Inherits:
Object
  • Object
show all
Defined in:
lib/vara/linter.rb

Class Method Summary collapse

Instance Method Summary collapse

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

Raises:



14
15
16
17
# File 'lib/vara/linter.rb', line 14

def lint!
  
  raise LintError, errors.join("\n") unless errors.empty?
end