Class: Ci::BuildTrace
- Inherits:
-
Object
- Object
- Ci::BuildTrace
- Defined in:
- app/models/ci/build_trace.rb
Instance Attribute Summary collapse
-
#build ⇒ Object
readonly
Returns the value of attribute build.
-
#trace ⇒ Object
readonly
Returns the value of attribute trace.
Instance Method Summary collapse
-
#initialize(build:, stream:, state:) ⇒ BuildTrace
constructor
A new instance of BuildTrace.
- #lines ⇒ Object
Constructor Details
#initialize(build:, stream:, state:) ⇒ BuildTrace
Returns a new instance of BuildTrace.
10 11 12 13 14 15 16 17 |
# File 'app/models/ci/build_trace.rb', line 10 def initialize(build:, stream:, state:) @build = build if stream.valid? stream.limit @trace = Gitlab::Ci::Ansi2json.convert(stream.stream, state) end end |
Instance Attribute Details
#build ⇒ Object (readonly)
Returns the value of attribute build.
5 6 7 |
# File 'app/models/ci/build_trace.rb', line 5 def build @build end |
#trace ⇒ Object (readonly)
Returns the value of attribute trace.
5 6 7 |
# File 'app/models/ci/build_trace.rb', line 5 def trace @trace end |
Instance Method Details
#lines ⇒ Object
19 20 21 |
# File 'app/models/ci/build_trace.rb', line 19 def lines @trace&.lines end |