Class: Gitlab::Ci::Ansi2json::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lines:, state:, append:, truncated:, offset:, stream:) ⇒ Result

Returns a new instance of Result.


10
11
12
13
14
15
16
17
18
# File 'lib/gitlab/ci/ansi2json/result.rb', line 10

def initialize(lines:, state:, append:, truncated:, offset:, stream:)
  @lines = lines
  @state = state
  @append = append
  @truncated = truncated
  @offset = offset
  @size = stream.tell - offset
  @total = stream.size
end

Instance Attribute Details

#appendObject (readonly)

Returns the value of attribute append


8
9
10
# File 'lib/gitlab/ci/ansi2json/result.rb', line 8

def append
  @append
end

#linesObject (readonly)

Returns the value of attribute lines


8
9
10
# File 'lib/gitlab/ci/ansi2json/result.rb', line 8

def lines
  @lines
end

#offsetObject (readonly)

Returns the value of attribute offset


8
9
10
# File 'lib/gitlab/ci/ansi2json/result.rb', line 8

def offset
  @offset
end

#sizeObject (readonly)

Returns the value of attribute size


8
9
10
# File 'lib/gitlab/ci/ansi2json/result.rb', line 8

def size
  @size
end

#stateObject (readonly)

Returns the value of attribute state


8
9
10
# File 'lib/gitlab/ci/ansi2json/result.rb', line 8

def state
  @state
end

#totalObject (readonly)

Returns the value of attribute total


8
9
10
# File 'lib/gitlab/ci/ansi2json/result.rb', line 8

def total
  @total
end

#truncatedObject (readonly)

Returns the value of attribute truncated


8
9
10
# File 'lib/gitlab/ci/ansi2json/result.rb', line 8

def truncated
  @truncated
end