Class: CircleCI::CoverageReporter::Artifact

Inherits:
Struct
  • Object
show all
Defined in:
lib/circleci/coverage_reporter/artifact.rb

Overview

Encapsulate a CircleCI artifact

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#node_indexObject

Returns the value of attribute node_index

Returns:

  • (Object)

    the current value of node_index



4
5
6
# File 'lib/circleci/coverage_reporter/artifact.rb', line 4

def node_index
  @node_index
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



4
5
6
# File 'lib/circleci/coverage_reporter/artifact.rb', line 4

def path
  @path
end

#pretty_pathObject

Returns the value of attribute pretty_path

Returns:

  • (Object)

    the current value of pretty_path



4
5
6
# File 'lib/circleci/coverage_reporter/artifact.rb', line 4

def pretty_path
  @pretty_path
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



4
5
6
# File 'lib/circleci/coverage_reporter/artifact.rb', line 4

def url
  @url
end

Instance Method Details

#bodyString

Returns:

  • (String)


11
12
13
# File 'lib/circleci/coverage_reporter/artifact.rb', line 11

def body
  @body ||= CoverageReporter.client.get(url).body
end

#end_with?(value) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/circleci/coverage_reporter/artifact.rb', line 6

def end_with?(value)
  pretty_path.end_with?(value)
end