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

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/core/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.



16
17
18
19
# File 'lib/datadog/core/transport/http/api/endpoint.rb', line 16

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

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



12
13
14
# File 'lib/datadog/core/transport/http/api/endpoint.rb', line 12

def path
  @path
end

#verbObject (readonly)

Returns the value of attribute verb.



12
13
14
# File 'lib/datadog/core/transport/http/api/endpoint.rb', line 12

def verb
  @verb
end

Instance Method Details

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

Yields:

  • (env)


21
22
23
24
25
# File 'lib/datadog/core/transport/http/api/endpoint.rb', line 21

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