Class: Feed2Email::RedirectionChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/feed2email/redirection_checker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ RedirectionChecker

Returns a new instance of RedirectionChecker.



8
9
10
11
# File 'lib/feed2email/redirection_checker.rb', line 8

def initialize(uri)
  @uri = uri
  check
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



6
7
8
# File 'lib/feed2email/redirection_checker.rb', line 6

def location
  @location
end

Instance Method Details

#permanently_redirected?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/feed2email/redirection_checker.rb', line 13

def permanently_redirected?
  redirected? && code == 301
end