Class: DraftjsExporter::Generators::VimeoGenerator
- Inherits:
-
Object
- Object
- DraftjsExporter::Generators::VimeoGenerator
- Defined in:
- app/models/draftjs_exporter/generators/vimeo_generator.rb
Instance Method Summary collapse
-
#initialize(contents) ⇒ VimeoGenerator
constructor
A new instance of VimeoGenerator.
- #render ⇒ Object
Constructor Details
#initialize(contents) ⇒ VimeoGenerator
Returns a new instance of VimeoGenerator.
4 5 6 7 8 |
# File 'app/models/draftjs_exporter/generators/vimeo_generator.rb', line 4 def initialize contents slickr = Bundler.rubygems.find_name('slickr').first.full_gem_path @contents = contents @template = File.read "#{slickr}/app/views/vimeo/iframe.html.erb" end |
Instance Method Details
#render ⇒ Object
10 11 12 |
# File 'app/models/draftjs_exporter/generators/vimeo_generator.rb', line 10 def render ERB.new(@template).result(binding) end |