Class: Sumomo::APITester

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ APITester

Returns a new instance of APITester.



398
399
400
401
# File 'lib/sumomo.rb', line 398

def initialize(&block)
  @apis = {}
  instance_eval(&block)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



414
# File 'lib/sumomo.rb', line 414

def method_missing(name, *args, &block); end

Instance Attribute Details

#apisObject

Returns the value of attribute apis.



397
398
399
# File 'lib/sumomo.rb', line 397

def apis
  @apis
end

Instance Method Details

#make_api(_domain_name, name:, script: nil, dns: nil, mtls_truststore: nil, cert: nil, with_statements: [], &block) ⇒ Object



403
404
405
406
407
408
409
410
411
412
# File 'lib/sumomo.rb', line 403

def make_api(_domain_name,
  name:, script: nil,
  dns: nil,
  mtls_truststore: nil,
  cert: nil,
  with_statements: [], &block)

  # we ignore mtls_truststore here
  @apis[name] = block
end