Module: DevSuite::RequestBuilder

Defined in:
lib/dev_suite/request_builder.rb,
lib/dev_suite/request_builder/tool.rb,
lib/dev_suite/request_builder/config.rb,
lib/dev_suite/request_builder/builder.rb,
lib/dev_suite/request_builder/formatter.rb,
lib/dev_suite/request_builder/tool/base.rb,
lib/dev_suite/request_builder/tool/curl.rb,
lib/dev_suite/request_builder/tool/tool.rb,
lib/dev_suite/request_builder/builder/base.rb,
lib/dev_suite/request_builder/builder/http.rb,
lib/dev_suite/request_builder/config/config.rb,
lib/dev_suite/request_builder/formatter/base.rb,
lib/dev_suite/request_builder/tool/validator.rb,
lib/dev_suite/request_builder/builder/builder.rb,
lib/dev_suite/request_builder/request_builder.rb,
lib/dev_suite/request_builder/formatter/graphql.rb,
lib/dev_suite/request_builder/formatter/formatter.rb,
lib/dev_suite/request_builder/tool/validator/curl.rb,
lib/dev_suite/request_builder/config/configuration.rb,
lib/dev_suite/request_builder/tool/validator/validator.rb

Defined Under Namespace

Modules: Builder, Config, Formatter, Tool

Class Method Summary collapse

Class Method Details

.build(protocol:, tool:, **options) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/dev_suite/request_builder/request_builder.rb', line 11

def build(protocol:, tool:, **options)
  case protocol
  when :http
    Builder::Http.new(tool: tool, **options)
  else
    raise ArgumentError, "Unknown protocol: #{protocol}"
  end
end