Module: Request::Builder::Dsl::ClassMethods

Defined in:
lib/request/builder/dsl.rb

Instance Method Summary collapse

Instance Method Details

#config(conf = nil) ⇒ Object



14
15
16
# File 'lib/request/builder/dsl.rb', line 14

def config(conf=nil)
  @config ||= conf&.deep_dup || RequestConfig.new
end

#configure(conf = nil, &block) ⇒ Object



18
19
20
21
22
# File 'lib/request/builder/dsl.rb', line 18

def configure(conf = nil, &block)
  config(conf)

  config.instance_eval(&block) if block
end