Sha256: eab1439c96778ea450392ee93163a8b01c2cb19f728e16c52ad04f56a65cb12a

Contents?: true

Size: 1.02 KB

Versions: 8

Compression:

Stored size: 1.02 KB

Contents

module Tanshuku
  class Configuration
    interface _UrlHasher
      def call: (String url, namespace: String) -> String
    end

    interface _KeyGenerator
      def call: -> String
    end

    interface _ExceptionReporter
      def call: (exception: Exception, original_url: String) -> void
    end

    extend ActiveModel::Attributes::ClassMethods

    @mutex: Thread::Mutex

    attr_accessor default_url_options (): Hash[String | Symbol, untyped]
    attr_accessor max_url_length (): Integer
    attr_accessor url_pattern (): Regexp
    attr_accessor key_length (): Integer
    attr_accessor url_hasher (): _UrlHasher
    attr_accessor key_generator (): _KeyGenerator
    attr_accessor exception_reporter (): _ExceptionReporter

    def initialize: (*bot noname) -> void
    def configure: { (Configuration) -> void } -> void

    module DefaultUrlHasher
      extend _UrlHasher
    end

    module DefaultKeyGenerator
      extend _KeyGenerator
    end

    module DefaultExceptionReporter
      extend _ExceptionReporter
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tanshuku-4.0.0 sig/lib/tanshuku/configuration.rbs
tanshuku-3.0.3 sig/lib/tanshuku/configuration.rbs
tanshuku-3.0.2 sig/lib/tanshuku/configuration.rbs
tanshuku-3.0.1 sig/lib/tanshuku/configuration.rbs
tanshuku-3.0.0 sig/lib/tanshuku/configuration.rbs
tanshuku-0.0.20 sig/lib/tanshuku/configuration.rbs
tanshuku-0.0.19 sig/lib/tanshuku/configuration.rbs
tanshuku-0.0.18 sig/lib/tanshuku/configuration.rbs