Class: RackReverseProxy::Rule::Candidate

Inherits:
Object
  • Object
show all
Defined in:
lib/rack_reverse_proxy/rule.rb

Overview

Candidate represents a request being matched

Instance Method Summary collapse

Constructor Details

#initialize(rule, has_custom_url, path, env, matches) ⇒ Candidate

Returns a new instance of Candidate.



56
57
58
59
60
61
62
63
64
# File 'lib/rack_reverse_proxy/rule.rb', line 56

def initialize(rule, has_custom_url, path, env, matches)
  @rule = rule
  @env = env
  @path = path
  @has_custom_url = has_custom_url
  @matches = matches

  @url = evaluate(matches.custom_url)
end

Instance Method Details

#build_uriObject



66
67
68
69
# File 'lib/rack_reverse_proxy/rule.rb', line 66

def build_uri
  return nil unless url
  raw_uri
end