Class: DraftjsExporter::Entities::YouTube

Inherits:
Object
  • Object
show all
Defined in:
app/models/draftjs_exporter/entities/you_tube.rb

Instance Method Summary collapse

Instance Method Details

#call(parent_element, data) ⇒ Object



2
3
4
5
6
7
# File 'app/models/draftjs_exporter/entities/you_tube.rb', line 2

def call(parent_element, data)
  args = data[:data][:iframe]
  template = DraftjsExporter::Generators::YouTubeGenerator.new(args).render
  parent_element.replace(template)
  parent_element
end