Class: URIPattern::MatchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/uri_pattern/match_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inputs:, protocol:, username:, password:, hostname:, port:, pathname:, query:, fragment:) ⇒ MatchResult

Returns a new instance of MatchResult.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/uri_pattern/match_result.rb', line 12

def initialize(inputs:, protocol:, username:, password:, hostname:,
               port:, pathname:, query:, fragment:)
  @inputs   = inputs
  @protocol = protocol
  @username = username
  @password = password
  @hostname = hostname
  @port     = port
  @pathname = pathname
  @query    = query
  @fragment = fragment
end

Instance Attribute Details

#fragmentObject (readonly)

inputs is the array of arguments passed to #match: [input] or [input, base_url], mirroring URLPatternResult.inputs in the spec.



9
10
11
# File 'lib/uri_pattern/match_result.rb', line 9

def fragment
  @fragment
end

#hostnameObject (readonly)

inputs is the array of arguments passed to #match: [input] or [input, base_url], mirroring URLPatternResult.inputs in the spec.



9
10
11
# File 'lib/uri_pattern/match_result.rb', line 9

def hostname
  @hostname
end

#inputsObject (readonly)

inputs is the array of arguments passed to #match: [input] or [input, base_url], mirroring URLPatternResult.inputs in the spec.



9
10
11
# File 'lib/uri_pattern/match_result.rb', line 9

def inputs
  @inputs
end

#passwordObject (readonly)

inputs is the array of arguments passed to #match: [input] or [input, base_url], mirroring URLPatternResult.inputs in the spec.



9
10
11
# File 'lib/uri_pattern/match_result.rb', line 9

def password
  @password
end

#pathnameObject (readonly)

inputs is the array of arguments passed to #match: [input] or [input, base_url], mirroring URLPatternResult.inputs in the spec.



9
10
11
# File 'lib/uri_pattern/match_result.rb', line 9

def pathname
  @pathname
end

#portObject (readonly)

inputs is the array of arguments passed to #match: [input] or [input, base_url], mirroring URLPatternResult.inputs in the spec.



9
10
11
# File 'lib/uri_pattern/match_result.rb', line 9

def port
  @port
end

#protocolObject (readonly)

inputs is the array of arguments passed to #match: [input] or [input, base_url], mirroring URLPatternResult.inputs in the spec.



9
10
11
# File 'lib/uri_pattern/match_result.rb', line 9

def protocol
  @protocol
end

#queryObject (readonly)

inputs is the array of arguments passed to #match: [input] or [input, base_url], mirroring URLPatternResult.inputs in the spec.



9
10
11
# File 'lib/uri_pattern/match_result.rb', line 9

def query
  @query
end

#usernameObject (readonly)

inputs is the array of arguments passed to #match: [input] or [input, base_url], mirroring URLPatternResult.inputs in the spec.



9
10
11
# File 'lib/uri_pattern/match_result.rb', line 9

def username
  @username
end