Class: EmbeddableContent::Images::AttributionsProcessor

Inherits:
Object
  • Object
show all
Defined in:
app/services/embeddable_content/images/attributions_processor.rb

Constant Summary collapse

TARGETS_NEEDING_ATTRIBUTIONS =
%i[print].freeze
ATTRIBUTIONS_PARTIAL =
'export/shared/attributions_images'.freeze
ATTRIBUTIONS_NODE_ID =
'image-attributions-node'.freeze
ATTRIBUTIONS_NODE_SELECTOR =
"div##{ATTRIBUTIONS_NODE_ID}".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image_processor) ⇒ AttributionsProcessor

Returns a new instance of AttributionsProcessor.



14
15
16
# File 'app/services/embeddable_content/images/attributions_processor.rb', line 14

def initialize(image_processor)
  @image_processor = image_processor
end

Instance Attribute Details

#image_processorObject (readonly)

Returns the value of attribute image_processor.



4
5
6
# File 'app/services/embeddable_content/images/attributions_processor.rb', line 4

def image_processor
  @image_processor
end

Instance Method Details

#process!Object



18
19
20
# File 'app/services/embeddable_content/images/attributions_processor.rb', line 18

def process!
  render_attributions if attributions_required?
end