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



105
106
107
# File 'lib/crawlberg/native.rb', line 105

def name
  @name
end

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



105
106
107
# File 'lib/crawlberg/native.rb', line 105

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



124
125
126
# File 'lib/crawlberg/native.rb', line 124

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

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


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

def basic? = false

#bearer?Boolean

Returns:

  • (Boolean)


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

def bearer? = false

#header?Boolean

Returns:

  • (Boolean)


120
121
122
# File 'lib/crawlberg/native.rb', line 120

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