Class: SAWS::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/saws/base.rb
Direct Known Subclasses
RDS
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
12
13
14
|
# File 'lib/saws/base.rb', line 12
def initialize(options = {})
@proxy = self.class.proxy.new SAWS.connection_options.merge(options)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *a, &b) ⇒ Object
22
23
24
|
# File 'lib/saws/base.rb', line 22
def method_missing(sym, *a, &b)
@proxy.respond_to?(sym) ? @proxy.send(sym, *a, &b) : super
end
|
Class Method Details
.proxy(klass = nil) ⇒ Object
5
6
7
8
|
# File 'lib/saws/base.rb', line 5
def proxy(klass = nil)
@_proxy = klass if klass
@_proxy ||= eval("Fog::AWS::#{name.split('::').last}")
end
|
Instance Method Details
#respond_to?(*a) ⇒ Boolean
16
17
18
|
# File 'lib/saws/base.rb', line 16
def respond_to?(*a)
super || @proxy.respond_to?(*a)
end
|