Class: Rafflesia::BuildRef

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/build_ref.rb

Constant Summary collapse

HASH_ATTRS =
{
  artifact_refs: :artifact_refs,
  content_digest: :content_digest,
  id: :id,
  is_content_pinned: :is_content_pinned,
  kind: :kind,
  metadata: :metadata,
  object: :object,
  precision: :precision,
  release_id: :release_id,
  runtime: :runtime,
  status: :status,
  tool: :tool,
  tool_version: :tool_version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BuildRef

Returns a new instance of BuildRef.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/foundry/build_ref.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @artifact_refs = (hash[:artifact_refs] || [])
  @content_digest = hash[:content_digest]
  @id = hash[:id]
  @is_content_pinned = hash[:is_content_pinned]
  @kind = hash[:kind]
  @metadata = hash[:metadata] || {}
  @object = hash[:object]
  @precision = hash[:precision]
  @release_id = hash[:release_id]
  @runtime = hash[:runtime]
  @status = hash[:status]
  @tool = hash[:tool]
  @tool_version = hash[:tool_version]
end

Instance Attribute Details

#artifact_refsObject

Returns the value of attribute artifact_refs.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def artifact_refs
  @artifact_refs
end

#content_digestObject

Returns the value of attribute content_digest.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def content_digest
  @content_digest
end

#idObject

Returns the value of attribute id.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def id
  @id
end

#is_content_pinnedObject

Returns the value of attribute is_content_pinned.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def is_content_pinned
  @is_content_pinned
end

#kindObject

Returns the value of attribute kind.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def kind
  @kind
end

#metadataObject

Returns the value of attribute metadata.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def 
  @metadata
end

#objectObject

Returns the value of attribute object.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def object
  @object
end

#precisionObject

Returns the value of attribute precision.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def precision
  @precision
end

#release_idObject

Returns the value of attribute release_id.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def release_id
  @release_id
end

#runtimeObject

Returns the value of attribute runtime.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def runtime
  @runtime
end

#statusObject

Returns the value of attribute status.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def status
  @status
end

#toolObject

Returns the value of attribute tool.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def tool
  @tool
end

#tool_versionObject

Returns the value of attribute tool_version.



24
25
26
# File 'lib/rafflesia/foundry/build_ref.rb', line 24

def tool_version
  @tool_version
end