Sha256: 5f918faf985b3c16c1484a467640146494bd8889caa371ca311c3be4832ef114

Contents?: true

Size: 611 Bytes

Versions: 2

Compression:

Stored size: 611 Bytes

Contents

# frozen_string_literal: true

require 'json'
require 'link_thumbnailer/version'
require 'link_thumbnailer/configuration'
require 'link_thumbnailer/exceptions'
require 'link_thumbnailer/page'

module LinkThumbnailer

  class << self

    attr_reader :page

    def generate(url, options = {})
      @page = ::LinkThumbnailer::Page.new(url, options)

      page.generate
    end

  end

end

begin
  require 'rails'
rescue LoadError
end

$stderr.puts <<-EOC if !defined?(Rails)
warning: no framework detected.

Your Gemfile might not be configured properly.
---- e.g. ----
Rails:
    gem 'link_thumbnailer'

EOC

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
link_thumbnailer-3.4.0 lib/link_thumbnailer.rb
link_thumbnailer-3.3.2 lib/link_thumbnailer.rb