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

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

Overview

Endpoint

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verb, path) ⇒ Endpoint

Returns a new instance of Endpoint.



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

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

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



11
12
13
# File 'lib/ddtrace/transport/http/api/endpoint.rb', line 11

def path
  @path
end

#verbObject (readonly)

Returns the value of attribute verb.



11
12
13
# File 'lib/ddtrace/transport/http/api/endpoint.rb', line 11

def verb
  @verb
end

Instance Method Details

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

Yields:

  • (env)


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

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