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.



208
209
210
211
# File 'lib/sumomo.rb', line 208

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



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

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

Instance Attribute Details

#apisObject

Returns the value of attribute apis.



207
208
209
# File 'lib/sumomo.rb', line 207

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



213
214
215
216
217
218
219
220
221
222
# File 'lib/sumomo.rb', line 213

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