Class: Alchemy::Ingredients::AudioView

Inherits:
BaseView
  • Object
show all
Defined in:
app/components/alchemy/ingredients/audio_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



4
5
6
7
8
# File 'app/components/alchemy/ingredients/audio_view.rb', line 4

def call
  (:audio, **html_options) do
    tag(:source, src: src, type: type)
  end
end

#render?Boolean

Returns:



10
11
12
# File 'app/components/alchemy/ingredients/audio_view.rb', line 10

def render?
  !!ingredient.attachment
end