Class: Gitlab::Ci::Lint::Result
- Inherits:
-
Object
- Object
- Gitlab::Ci::Lint::Result
- Defined in:
- lib/gitlab/ci/lint.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#includes ⇒ Object
readonly
Returns the value of attribute includes.
-
#jobs ⇒ Object
readonly
Returns the value of attribute jobs.
-
#merged_yaml ⇒ Object
readonly
Returns the value of attribute merged_yaml.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(jobs:, merged_yaml:, errors:, warnings:, includes:) ⇒ Result
constructor
A new instance of Result.
- #status ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(jobs:, merged_yaml:, errors:, warnings:, includes:) ⇒ Result
Returns a new instance of Result.
9 10 11 12 13 14 15 |
# File 'lib/gitlab/ci/lint.rb', line 9 def initialize(jobs:, merged_yaml:, errors:, warnings:, includes:) @jobs = jobs @merged_yaml = merged_yaml @errors = errors @warnings = warnings @includes = includes end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/gitlab/ci/lint.rb', line 7 def errors @errors end |
#includes ⇒ Object (readonly)
Returns the value of attribute includes.
7 8 9 |
# File 'lib/gitlab/ci/lint.rb', line 7 def includes @includes end |
#jobs ⇒ Object (readonly)
Returns the value of attribute jobs.
7 8 9 |
# File 'lib/gitlab/ci/lint.rb', line 7 def jobs @jobs end |
#merged_yaml ⇒ Object (readonly)
Returns the value of attribute merged_yaml.
7 8 9 |
# File 'lib/gitlab/ci/lint.rb', line 7 def merged_yaml @merged_yaml end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings.
7 8 9 |
# File 'lib/gitlab/ci/lint.rb', line 7 def warnings @warnings end |
Instance Method Details
#status ⇒ Object
21 22 23 |
# File 'lib/gitlab/ci/lint.rb', line 21 def status valid? ? :valid : :invalid end |
#valid? ⇒ Boolean
17 18 19 |
# File 'lib/gitlab/ci/lint.rb', line 17 def valid? @errors.empty? end |