Class: MarkdownComposer::Validator
- Inherits:
-
Object
- Object
- MarkdownComposer::Validator
- Defined in:
- lib/markdown_composer/validator.rb
Instance Attribute Summary collapse
-
#diagnostics ⇒ Object
readonly
Returns the value of attribute diagnostics.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#sources ⇒ Object
readonly
Returns the value of attribute sources.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(plan, sources: [], options: {}, diagnostics: Diagnostics.new) ⇒ Validator
constructor
A new instance of Validator.
Constructor Details
#initialize(plan, sources: [], options: {}, diagnostics: Diagnostics.new) ⇒ Validator
Returns a new instance of Validator.
7 8 9 10 11 12 |
# File 'lib/markdown_composer/validator.rb', line 7 def initialize(plan, sources: [], options: {}, diagnostics: Diagnostics.new) @plan = plan @sources = Array(sources) @options = @diagnostics = diagnostics end |
Instance Attribute Details
#diagnostics ⇒ Object (readonly)
Returns the value of attribute diagnostics.
5 6 7 |
# File 'lib/markdown_composer/validator.rb', line 5 def diagnostics @diagnostics end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/markdown_composer/validator.rb', line 5 def @options end |
#plan ⇒ Object (readonly)
Returns the value of attribute plan.
5 6 7 |
# File 'lib/markdown_composer/validator.rb', line 5 def plan @plan end |
#sources ⇒ Object (readonly)
Returns the value of attribute sources.
5 6 7 |
# File 'lib/markdown_composer/validator.rb', line 5 def sources @sources end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/markdown_composer/validator.rb', line 14 def call validate_output validate_steps validate_transforms diagnostics.concat(plan.diagnostics) diagnostics end |