Class: Crawlberg::AuthConfigHeader

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
AuthConfig
Defined in:
lib/crawlberg/native.rb

Overview

Custom authentication header.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



86
87
88
# File 'lib/crawlberg/native.rb', line 86

def name
  @name
end

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



86
87
88
# File 'lib/crawlberg/native.rb', line 86

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



107
108
109
# File 'lib/crawlberg/native.rb', line 107

def self.from_hash(hash)
  new(name: hash[:name] || hash["name"], value: hash[:value] || hash["value"])
end

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


99
# File 'lib/crawlberg/native.rb', line 99

def basic? = false

#bearer?Boolean

Returns:

  • (Boolean)


101
# File 'lib/crawlberg/native.rb', line 101

def bearer? = false

#header?Boolean

Returns:

  • (Boolean)


103
104
105
# File 'lib/crawlberg/native.rb', line 103

def header? = true
# @param hash [Hash] deserialized from the native extension
# @return [self]