Sha256: f2ddef0271a5a080aa9c120231602ff2647a23dd8538a74cf6e7db66f02a414c

Contents?: true

Size: 706 Bytes

Versions: 1

Compression:

Stored size: 706 Bytes

Contents

require 'vulndbhq/client'

module VulnDBHQ
  class << self

    include VulnDBHQ::Configurable

    def client
      VulnDBHQ::Client.new(options)
    end

    # Delegate to a VulnDBHQ::Client
    def respond_to?(method, include_private=false)
      self.client.respond_to?(method, include_private) || super
    end

    def options
      @options = {}
      VulnDBHQ::Configurable.keys.each do |key|
        @options[key] = instance_variable_get("@#{key}")
      end
      @options
    end

    def reset!
      VulnDBHQ::Configurable.keys.each do |key|
        instance_variable_set("@#{key}", VulnDBHQ::Default.options[key])
      end
      self
    end
    alias setup reset!

  end
end

VulnDBHQ.setup

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vulndbhq-0.0.1.beta lib/vulndbhq.rb