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



113
114
115
# File 'lib/crawlberg/native.rb', line 113

def name
  @name
end

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



113
114
115
# File 'lib/crawlberg/native.rb', line 113

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



134
135
136
# File 'lib/crawlberg/native.rb', line 134

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

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


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

def basic? = false

#bearer?Boolean

Returns:

  • (Boolean)


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

def bearer? = false

#header?Boolean

Returns:

  • (Boolean)


130
131
132
# File 'lib/crawlberg/native.rb', line 130

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