Class: Datadog::Transport::HTTP::API::Endpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/ddtrace/transport/http/api/endpoint.rb

Overview

Endpoint

Direct Known Subclasses

Traces::API::Endpoint

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verb, path) ⇒ Endpoint

Returns a new instance of Endpoint.



13
14
15
16
# File 'lib/ddtrace/transport/http/api/endpoint.rb', line 13

def initialize(verb, path)
  @verb = verb
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/ddtrace/transport/http/api/endpoint.rb', line 9

def path
  @path
end

#verbObject (readonly)

Returns the value of attribute verb.



9
10
11
# File 'lib/ddtrace/transport/http/api/endpoint.rb', line 9

def verb
  @verb
end

Instance Method Details

#call(env) {|env| ... } ⇒ Object

Yields:

  • (env)


18
19
20
21
22
# File 'lib/ddtrace/transport/http/api/endpoint.rb', line 18

def call(env)
  env.verb = verb
  env.path = path
  yield(env)
end