Sha256: 06cc6aaa3c9dd9bb133eb895eeb23fe025dd14fd44a7d8f47f99303835ebdfdc

Contents?: true

Size: 463 Bytes

Versions: 61

Compression:

Stored size: 463 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]}' #{Helpers.title_attr(og)}>"
      end

    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
onebox-1.8.14 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.13 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.12 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.11 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.10 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.9 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.8 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.7 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.6 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.5 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.4 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.3 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.2 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.1 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.8.0 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.7.9 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.7.8 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.7.7 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.7.6 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-1.7.5 lib/onebox/engine/five_hundred_px_onebox.rb