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.



185
186
187
188
# File 'lib/sumomo.rb', line 185

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



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

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

Instance Attribute Details

#apisObject

Returns the value of attribute apis.



184
185
186
# File 'lib/sumomo.rb', line 184

def apis
  @apis
end

Instance Method Details

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



190
191
192
# File 'lib/sumomo.rb', line 190

def make_api(_domain_name, name:, script: nil, dns: nil, cert: nil, with_statements: [], &block)
  @apis[name] = block
end