Sha256: 56ac198ef3a5c35a637433388bd0df5a063decfd7b4774ff43ebca8f88bfce12

Contents?: true

Size: 478 Bytes

Versions: 23

Compression:

Stored size: 478 Bytes

Contents

module Onebox
  module Engine
    class FiveHundredPxOnebox
      include Engine
      include StandardEmbed

      matches_regexp(/^https?:\/\/500px\.com\/photo\/\d+\//)
      always_https

      def to_html
        og = get_opengraph
        escaped_src = ::Onebox::Helpers.normalize_url_for_output(og[:image])
        "<img src='#{escaped_src}' width='#{og[:image_width]}' height='#{og[:image_height]}' class='onebox' #{Helpers.title_attr(og)}>"
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
onebox-1.8.59 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.58 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.57 lib/onebox/engine/five_hundred_px_onebox.rb