Class: Bloodbath::Adapters::Rest

Inherits:
Object
  • Object
show all
Defined in:
lib/bloodbath/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method:, endpoint:, body: nil, config: Bloodbath.config) ⇒ Rest

Returns a new instance of Rest.



11
12
13
14
15
16
# File 'lib/bloodbath/event.rb', line 11

def initialize(method:, endpoint:, body: nil, config: Bloodbath.config)
  @method = method
  @endpoint = endpoint
  @body = body
  @config = config
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



9
10
11
# File 'lib/bloodbath/event.rb', line 9

def body
  @body
end

#configObject (readonly)

Returns the value of attribute config.



9
10
11
# File 'lib/bloodbath/event.rb', line 9

def config
  @config
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



9
10
11
# File 'lib/bloodbath/event.rb', line 9

def endpoint
  @endpoint
end

#methodObject (readonly)

Returns the value of attribute method.



9
10
11
# File 'lib/bloodbath/event.rb', line 9

def method
  @method
end

Instance Method Details

#performObject



18
19
20
21
# File 'lib/bloodbath/event.rb', line 18

def perform
  check_api_key
  response
end