Class: Alchemy::Ingredients::VideoView

Inherits:
BaseView
  • Object
show all
Defined in:
app/components/alchemy/ingredients/video_view.rb

Instance Attribute Summary

Attributes inherited from BaseView

#ingredient

Instance Method Summary collapse

Methods inherited from BaseView

#initialize

Constructor Details

This class inherits a constructor from Alchemy::Ingredients::BaseView

Instance Method Details

#callObject



6
7
8
9
10
# File 'app/components/alchemy/ingredients/video_view.rb', line 6

def call
  (:video, html_options) do
    tag(:source, src: src, type: attachment.file_mime_type)
  end.html_safe
end

#render?Boolean

Returns:



12
13
14
# File 'app/components/alchemy/ingredients/video_view.rb', line 12

def render?
  !attachment.nil?
end