Class: Humidifier::AwsAdapters::Noop
- Inherits:
-
Object
- Object
- Humidifier::AwsAdapters::Noop
- Defined in:
- lib/humidifier/aws_adapters/noop.rb
Overview
An adapter used when neither SDK is loaded
Instance Method Summary collapse
-
#method_missing(method) ⇒ Object
Capture all STACK_METHODS method calls and warn that they will not be run.
-
#respond_to_missing?(method) ⇒ Boolean
We capture stack methods and warn about them but don’t actually respond to them.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method) ⇒ Object
Capture all STACK_METHODS method calls and warn that they will not be run
7 8 9 10 11 12 13 14 |
# File 'lib/humidifier/aws_adapters/noop.rb', line 7 def method_missing(method, *) if AwsShim::STACK_METHODS.include?(method) puts "WARNING: Cannot run #{method} because aws-sdk not loaded." false else super end end |
Instance Method Details
#respond_to_missing?(method) ⇒ Boolean
We capture stack methods and warn about them but don’t actually respond to them
18 19 20 |
# File 'lib/humidifier/aws_adapters/noop.rb', line 18 def respond_to_missing?(method, *) AwsShim::STACK_METHODS.include?(method) ? false : super end |