Sha256: db1ee97ea032c65142b77d5b4670669067cd6990df46caaa6fd72334fd0559ab

Contents?: true

Size: 450 Bytes

Versions: 5

Compression:

Stored size: 450 Bytes

Contents

module AmpHtml
    module MediaHelper

        def image_tag source, options = {}
            amp? ? component('amp/img', options.merge(src: source)) : super
        end
        def video_tag *sources
            amp? ? component('amp/video', options.merge(sources: sources)) : super
        end
        def audio_tag *sources
            amp? ? component('amp/audio', options.merge(sources: sources)) : super
        end

    end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
amp-html-1.2.1 app/helpers/amp_html/media_helper.rb
amp-html-1.2.0 app/helpers/amp_html/media_helper.rb
amp-html-1.1.0 app/helpers/amp_html/media_helper.rb
amp-html-1.0.1 app/helpers/amp_html/media_helper.rb
amp-html-1.0.0 app/helpers/amp_html/media_helper.rb