Class: Ci::BuildTrace

Inherits:
Object
  • Object
show all
Defined in:
app/models/ci/build_trace.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#buildObject (readonly)

Returns the value of attribute build


5
6
7
# File 'app/models/ci/build_trace.rb', line 5

def build
  @build
end

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

#linesObject


19
20
21
# File 'app/models/ci/build_trace.rb', line 19

def lines
  @trace&.lines
end