Class: DevSuite::RequestBuilder::Builder::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dev_suite/request_builder/builder/base.rb

Direct Known Subclasses

Http

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, headers: {}, tool:) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
# File 'lib/dev_suite/request_builder/builder/base.rb', line 9

def initialize(url:, headers: {}, tool:)
  @url = url
  @headers = headers
  @tool = tool
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



7
8
9
# File 'lib/dev_suite/request_builder/builder/base.rb', line 7

def headers
  @headers
end

#toolObject (readonly)

Returns the value of attribute tool.



7
8
9
# File 'lib/dev_suite/request_builder/builder/base.rb', line 7

def tool
  @tool
end

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'lib/dev_suite/request_builder/builder/base.rb', line 7

def url
  @url
end

Instance Method Details

#build_commandObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/dev_suite/request_builder/builder/base.rb', line 15

def build_command
  raise NotImplementedError, "Subclasses must implement the `build_command` method"
end