Class: Rails::Hyperdrive::ArtifactStatus::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/rails/hyperdrive/artifact_status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#artifactObject

Returns the value of attribute artifact

Returns:

  • (Object)

    the current value of artifact



13
14
15
# File 'lib/rails/hyperdrive/artifact_status.rb', line 13

def artifact
  @artifact
end

#bundle_sourceObject

Returns the value of attribute bundle_source

Returns:

  • (Object)

    the current value of bundle_source



13
14
15
# File 'lib/rails/hyperdrive/artifact_status.rb', line 13

def bundle_source
  @bundle_source
end

#locked_sourceObject

Returns the value of attribute locked_source

Returns:

  • (Object)

    the current value of locked_source



13
14
15
# File 'lib/rails/hyperdrive/artifact_status.rb', line 13

def locked_source
  @locked_source
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



13
14
15
# File 'lib/rails/hyperdrive/artifact_status.rb', line 13

def path
  @path
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



13
14
15
# File 'lib/rails/hyperdrive/artifact_status.rb', line 13

def state
  @state
end

Instance Method Details

#to_sObject



14
15
16
17
18
19
20
21
# File 'lib/rails/hyperdrive/artifact_status.rb', line 14

def to_s
  case state
  when :missing  then "#{path} (from #{bundle_source})"
  when :outdated then "#{path} (#{locked_source}#{bundle_source})"
  when :orphaned then "#{path} (source #{locked_source} no longer in bundle)"
  else path
  end
end