Class: Rack::BearerAuth::MatchPattern::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/bearer_auth/match_pattern.rb

Direct Known Subclasses

Path, Token, Via

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pattern) ⇒ Base

Returns a new instance of Base.



32
33
34
# File 'lib/rack/bearer_auth/match_pattern.rb', line 32

def initialize(pattern)
  @pattern = pattern
end

Instance Attribute Details

#patternObject (readonly)

Returns the value of attribute pattern.



30
31
32
# File 'lib/rack/bearer_auth/match_pattern.rb', line 30

def pattern
  @pattern
end

Class Method Details

.newObject



40
41
42
43
44
45
46
# File 'lib/rack/bearer_auth/match_pattern.rb', line 40

def self.new(*)
  if self == Base
    raise ::NotImplementedError,
          "#{self} is an abstract class and cannot be instantiated."
  end
  super
end

Instance Method Details

#match?Boolean

Returns:

  • (Boolean)

Raises:

  • (::NotImplementedError)


36
37
38
# File 'lib/rack/bearer_auth/match_pattern.rb', line 36

def match?(*)
  raise ::NotImplementedError
end