Class: Spark::Embed::WistiaMedia

Inherits:
Component::Base
  • Object
show all
Defined in:
app/components/spark/embed/wistia_media.rb

Instance Method Summary collapse

Methods inherited from Component::Base

#selector, #to_s, #unique_id

Constructor Details

#initializeWistiaMedia

Returns a new instance of WistiaMedia.



11
12
13
14
15
16
17
18
19
# File 'app/components/spark/embed/wistia_media.rb', line 11

def initialize(*)
  super

  classname.base = "spark-wistia-media"

  unless @height.blank?
    tag_attrs.merge!(style: "height: #{@height}px;max-width: #{@width}px")
  end
end