Class: Submission::FlexibleRequestGraph::UnplexedLink
- Inherits:
-
Object
- Object
- Submission::FlexibleRequestGraph::UnplexedLink
- Includes:
- ChainLink
- Defined in:
- app/models/submission/flexible_request_graph.rb
Instance Method Summary collapse
- #generate_target_assets ⇒ Object
-
#initialize(request_type, multiplier, assets, chain) ⇒ UnplexedLink
constructor
A new instance of UnplexedLink.
- #source_assets_doublet_with_index ⇒ Object
Methods included from ChainLink
build!, #build!, included, #multiplexed?, #target_assets
Constructor Details
#initialize(request_type, multiplier, assets, chain) ⇒ UnplexedLink
Returns a new instance of UnplexedLink.
210 211 212 213 214 |
# File 'app/models/submission/flexible_request_graph.rb', line 210 def initialize(request_type, multiplier, assets, chain) raise RequestChainError if request_type.for_multiplexing? super end |
Instance Method Details
#generate_target_assets ⇒ Object
216 217 218 219 220 221 222 223 |
# File 'app/models/submission/flexible_request_graph.rb', line 216 def generate_target_assets source_assets_qc_metrics .map { |doublet| Doublet.new(create_target_asset(doublet.asset), doublet.qc_metric) } .tap do |new_target_assets| @target_assets_qc_metrics ||= [] @target_assets_qc_metrics.concat(new_target_assets) end end |
#source_assets_doublet_with_index ⇒ Object
225 226 227 |
# File 'app/models/submission/flexible_request_graph.rb', line 225 def source_assets_doublet_with_index source_assets_qc_metrics.each_with_index { |doublet, index| yield(doublet, index) } end |