Class: Webspicy::Checker
- Inherits:
-
Object
- Object
- Webspicy::Checker
- Defined in:
- lib/webspicy/checker.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(config) ⇒ Checker
constructor
A new instance of Checker.
Constructor Details
#initialize(config) ⇒ Checker
Returns a new instance of Checker.
4 5 6 |
# File 'lib/webspicy/checker.rb', line 4 def initialize(config) @config = Configuration.dress(config) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/webspicy/checker.rb', line 7 def config @config end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/webspicy/checker.rb', line 9 def call config.each_scope do |scope| scope.each_resource_file do |file, folder| RSpec.describe file.relative_to(folder).to_s do it 'meets the formal doc data schema' do Webspicy.resource(file.load, file, scope) end end end end RSpec::Core::Runner.run config. end |