Class: ReactorSDK::Resources::ComprehensiveUpstreamChain
- Inherits:
-
Object
- Object
- ReactorSDK::Resources::ComprehensiveUpstreamChain
- Includes:
- Enumerable
- Defined in:
- lib/reactor_sdk/resources/comprehensive_upstream_chain.rb
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#property_id ⇒ Object
readonly
Returns the value of attribute property_id.
-
#resource_id ⇒ Object
readonly
Returns the value of attribute resource_id.
-
#resource_type ⇒ Object
readonly
Returns the value of attribute resource_type.
-
#target_comprehensive_resource ⇒ Object
readonly
Returns the value of attribute target_comprehensive_resource.
-
#target_library_id ⇒ Object
readonly
Returns the value of attribute target_library_id.
-
#target_resource ⇒ Object
readonly
Returns the value of attribute target_resource.
-
#target_revision_id ⇒ Object
readonly
Returns the value of attribute target_revision_id.
Instance Method Summary collapse
- #each ⇒ Object
- #found? ⇒ Boolean
-
#initialize(resource_id:, resource_type:, property_id:, target_library_id:, target_resource:, target_revision_id:, target_comprehensive_resource:, entries:) ⇒ ComprehensiveUpstreamChain
constructor
A new instance of ComprehensiveUpstreamChain.
- #nearest_match ⇒ Object
Constructor Details
#initialize(resource_id:, resource_type:, property_id:, target_library_id:, target_resource:, target_revision_id:, target_comprehensive_resource:, entries:) ⇒ ComprehensiveUpstreamChain
Returns a new instance of ComprehensiveUpstreamChain.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 17 def initialize( resource_id:, resource_type:, property_id:, target_library_id:, target_resource:, target_revision_id:, target_comprehensive_resource:, entries: ) @resource_id = resource_id @resource_type = resource_type @property_id = property_id @target_library_id = target_library_id @target_resource = target_resource @target_revision_id = target_revision_id @target_comprehensive_resource = target_comprehensive_resource @entries = Array(entries) end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
8 9 10 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 8 def entries @entries end |
#property_id ⇒ Object (readonly)
Returns the value of attribute property_id.
8 9 10 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 8 def property_id @property_id end |
#resource_id ⇒ Object (readonly)
Returns the value of attribute resource_id.
8 9 10 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 8 def resource_id @resource_id end |
#resource_type ⇒ Object (readonly)
Returns the value of attribute resource_type.
8 9 10 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 8 def resource_type @resource_type end |
#target_comprehensive_resource ⇒ Object (readonly)
Returns the value of attribute target_comprehensive_resource.
8 9 10 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 8 def target_comprehensive_resource @target_comprehensive_resource end |
#target_library_id ⇒ Object (readonly)
Returns the value of attribute target_library_id.
8 9 10 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 8 def target_library_id @target_library_id end |
#target_resource ⇒ Object (readonly)
Returns the value of attribute target_resource.
8 9 10 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 8 def target_resource @target_resource end |
#target_revision_id ⇒ Object (readonly)
Returns the value of attribute target_revision_id.
8 9 10 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 8 def target_revision_id @target_revision_id end |
Instance Method Details
#each ⇒ Object
37 38 39 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 37 def each(&) @entries.each(&) end |
#found? ⇒ Boolean
45 46 47 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 45 def found? !nearest_match.nil? end |
#nearest_match ⇒ Object
41 42 43 |
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain.rb', line 41 def nearest_match @entries.find(&:present?) end |