Sha256: 86f3890fc57ad5c1f6e1808a9182ab1daf1b959f7271d6cbaab952f3a23b59fa

Contents?: true

Size: 415 Bytes

Versions: 7

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

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
        "<img src='#{og.image}' width='#{og.image_width}' height='#{og.image_height}' class='onebox' #{og.title_attr}>"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
onebox-2.2.19 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-2.2.18 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-2.2.17 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-2.2.16 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-2.2.15 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-2.2.14 lib/onebox/engine/five_hundred_px_onebox.rb
onebox-2.2.13 lib/onebox/engine/five_hundred_px_onebox.rb