Class: Gitlab::Ci::Lint::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/ci/lint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(jobs:, errors:, warnings:) ⇒ Result

Returns a new instance of Result.


9
10
11
12
13
# File 'lib/gitlab/ci/lint.rb', line 9

def initialize(jobs:, errors:, warnings:)
  @jobs = jobs
  @errors = errors
  @warnings = warnings
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors


7
8
9
# File 'lib/gitlab/ci/lint.rb', line 7

def errors
  @errors
end

#jobsObject (readonly)

Returns the value of attribute jobs


7
8
9
# File 'lib/gitlab/ci/lint.rb', line 7

def jobs
  @jobs
end

#warningsObject (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

#valid?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'lib/gitlab/ci/lint.rb', line 15

def valid?
  @errors.empty?
end