Sha256: 6f02757082ae6621e1f29d31e32df506e19d6ddd2658cbceb4c47220c78c57d2

Contents?: true

Size: 763 Bytes

Versions: 1

Compression:

Stored size: 763 Bytes

Contents

module VideoGrabber

  # Access point for the gem configurations.
  #
  # @return [VideoGrabber::Configuration] a configuration instance.
  def self.config
    @config ||= Configuration.new
  end

  # Configure hook used in the gem initializer. Convinient way to set all the
  # gem configurations.
  #
  # example:
  #   VideoGrabber.configure do |config|
  #     config.timeout = 60
  #   end
  #
  # @return [void]
  def self.configure
    yield config if block_given?
  end

  class Configuration

    attr_accessor :url, :keep_browser_open, :timeout, :headless_enabled,
                  :firefox_extension_path, :attributes

    def initialize
      @keep_browser_open = false
      @timeout           = 60
      @headless_enabled  = true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
video_grabber-1.5.0 lib/video_grabber/config.rb