Class: LcpRuby::Services::Checker
- Inherits:
-
Object
- Object
- LcpRuby::Services::Checker
- Defined in:
- lib/lcp_ruby/services/checker.rb
Defined Under Namespace
Classes: CheckResult
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(model_definitions) ⇒ Checker
constructor
A new instance of Checker.
Constructor Details
#initialize(model_definitions) ⇒ Checker
Returns a new instance of Checker.
22 23 24 25 |
# File 'lib/lcp_ruby/services/checker.rb', line 22 def initialize(model_definitions) @model_definitions = model_definitions @errors = [] end |
Instance Method Details
#check ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/lcp_ruby/services/checker.rb', line 27 def check @errors = [] @model_definitions.each_value do |model_def| check_model(model_def) end CheckResult.new(errors: @errors.dup) end |