Sha256: 14a409c4909fdc3fa70fb4ec9cb22bcaf70d5e9410ddc59456428ec6687d5a2f

Contents?: true

Size: 556 Bytes

Versions: 1

Compression:

Stored size: 556 Bytes

Contents

module Rspamd
  class Configuration
    attr_reader :options

    def initialize(**options)
      @options = options
    end

    def scheme
      options[:scheme] || "http"
    end

    def host
      options[:host] || "localhost"
    end

    def port
      options[:port] || 11333
    end


    def open_timeout
      options[:open_timeout] || 1
    end

    def read_timeout
      options[:read_timeout] || 10
    end


    def user_agent
      options[:user_agent] || "rspamd-ruby"
    end

    def password
      options[:password]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspamd-ruby-1.0.0 lib/rspamd/configuration.rb