Sha256: 7834fbb18d8969f2a01c2b18cf7a66c5815f0bc46b752e14899cab260c08a910

Contents?: true

Size: 589 Bytes

Versions: 1

Compression:

Stored size: 589 Bytes

Contents

module VulnDBHQ
  # Defines constants and methods related to configuration
  module Configurable

    # Convenience method to allow configuration options to be set in a block
    def configure
      yield self
      self
    end

    # An array of valid keys in the options hash when configuring a {VulnDBHQ::Client}
    CONFIG_KEYS = [
      :connection_options,
      :host,
      :middleware
    ]
    attr_accessor *CONFIG_KEYS

    AUTH_KEYS = [
      :user,
      :password
    ]
    attr_writer *AUTH_KEYS

    def self.keys
      @keys ||= CONFIG_KEYS + AUTH_KEYS
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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