Class: Cb::Requests::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/requests/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argument_hash) ⇒ Base

Returns a new instance of Base.

Raises:

  • (ArgumentError)


7
8
9
10
# File 'lib/cb/requests/base.rb', line 7

def initialize(argument_hash)
  raise ArgumentError.new("#{argument_hash.class} is not a Hash") unless argument_hash.is_a?(Hash)
  @args = argument_hash
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



5
6
7
# File 'lib/cb/requests/base.rb', line 5

def args
  @args
end

Instance Method Details

#bodyObject



28
29
30
# File 'lib/cb/requests/base.rb', line 28

def body
  nil
end

#endpoint_uriObject



12
13
14
# File 'lib/cb/requests/base.rb', line 12

def endpoint_uri
  raise NotImplementedError.new __method__
end

#headersObject



24
25
26
# File 'lib/cb/requests/base.rb', line 24

def headers
  nil
end

#http_methodObject



16
17
18
# File 'lib/cb/requests/base.rb', line 16

def http_method
  raise NotImplementedError.new __method__
end

#queryObject



20
21
22
# File 'lib/cb/requests/base.rb', line 20

def query
  nil
end