Class: ReactorSDK::Resources::UpstreamChainEntry
- Inherits:
-
Object
- Object
- ReactorSDK::Resources::UpstreamChainEntry
- Defined in:
- lib/reactor_sdk/resources/upstream_chain_entry.rb
Instance Attribute Summary collapse
-
#library ⇒ Object
readonly
Returns the value of attribute library.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
-
#revision_id ⇒ Object
readonly
Returns the value of attribute revision_id.
-
#stage ⇒ Object
readonly
Returns the value of attribute stage.
Instance Method Summary collapse
-
#entity_snapshot ⇒ Hash?
Point-in-time snapshot for the matched revision.
-
#initialize(library:, stage:, resource:, revision_id:, revision:) ⇒ UpstreamChainEntry
constructor
A new instance of UpstreamChainEntry.
-
#inspect ⇒ String
Human-readable representation.
-
#present? ⇒ Boolean
True when the resource exists in this upstream library.
Constructor Details
#initialize(library:, stage:, resource:, revision_id:, revision:) ⇒ UpstreamChainEntry
Returns a new instance of UpstreamChainEntry.
21 22 23 24 25 26 27 |
# File 'lib/reactor_sdk/resources/upstream_chain_entry.rb', line 21 def initialize(library:, stage:, resource:, revision_id:, revision:) @library = library @stage = stage @resource = resource @revision_id = revision_id @revision = revision end |
Instance Attribute Details
#library ⇒ Object (readonly)
Returns the value of attribute library.
19 20 21 |
# File 'lib/reactor_sdk/resources/upstream_chain_entry.rb', line 19 def library @library end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
19 20 21 |
# File 'lib/reactor_sdk/resources/upstream_chain_entry.rb', line 19 def resource @resource end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
19 20 21 |
# File 'lib/reactor_sdk/resources/upstream_chain_entry.rb', line 19 def revision @revision end |
#revision_id ⇒ Object (readonly)
Returns the value of attribute revision_id.
19 20 21 |
# File 'lib/reactor_sdk/resources/upstream_chain_entry.rb', line 19 def revision_id @revision_id end |
#stage ⇒ Object (readonly)
Returns the value of attribute stage.
19 20 21 |
# File 'lib/reactor_sdk/resources/upstream_chain_entry.rb', line 19 def stage @stage end |
Instance Method Details
#entity_snapshot ⇒ Hash?
Returns Point-in-time snapshot for the matched revision.
39 40 41 |
# File 'lib/reactor_sdk/resources/upstream_chain_entry.rb', line 39 def entity_snapshot @revision&.entity_snapshot end |
#inspect ⇒ String
Returns Human-readable representation.
46 47 48 49 50 51 52 |
# File 'lib/reactor_sdk/resources/upstream_chain_entry.rb', line 46 def inspect '#<ReactorSDK::Resources::UpstreamChainEntry ' \ "library_id=#{library.id.inspect} " \ "stage=#{stage.inspect} " \ "resource_id=#{resource&.id.inspect} " \ "revision_id=#{revision_id.inspect}>" end |
#present? ⇒ Boolean
Returns true when the resource exists in this upstream library.
32 33 34 |
# File 'lib/reactor_sdk/resources/upstream_chain_entry.rb', line 32 def present? !@resource.nil? end |