Sha256: 524069b03ee2fc838e0b0d1cff3763139395497fa32123481aaae4a41fdad887

Contents?: true

Size: 449 Bytes

Versions: 5

Compression:

Stored size: 449 Bytes

Contents

module Convert
  module Converters

    # Embed youtube by id
    def youtube_embed(string, options = {})
      options = {:width => 590, :height => 335}.merge(options)

      %{<iframe src="https://www.youtube.com/embed/#{string}?wmode=transparent&modestbranding=1&fs=1&rel=0" allowfullscreen="1" webkitallowfullscreen="1" mozallowfullscreen="1" width="#{options[:width]}" height="#{options[:height]}" frameborder="0"></iframe>}
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
convert-0.1.7 lib/converters/youtube_embed.rb
convert-0.1.6 lib/converters/youtube_embed.rb
convert-0.1.5 lib/converters/youtube_embed.rb
convert-0.1.4 lib/converters/youtube_embed.rb
convert-0.1.3 lib/converters/youtube_embed.rb