Module: HttpStub::Configurer::Part

Defined in:
lib/http_stub/configurer/part.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



12
13
14
# File 'lib/http_stub/configurer/part.rb', line 12

def method_missing(name, *args, &block)
  @configurer.send(name, *args, &block)
end

Instance Method Details

#configure(configurer) ⇒ Object



6
7
8
9
10
# File 'lib/http_stub/configurer/part.rb', line 6

def configure(configurer)
  @configurer = configurer
  configure_methods = self.methods.find_all { |method| method.to_s =~ /^configure_.+_(stub|scenario)s?$/ }
  configure_methods.each { |configure_method| self.send(configure_method) }
end