Class: Breeze::FogWrapper::AbstractConnectionWrapper
- Inherits:
-
Object
- Object
- Breeze::FogWrapper::AbstractConnectionWrapper
show all
- Defined in:
- lib/breeze/fog_wrapper.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/breeze/fog_wrapper.rb', line 25
def method_missing(*args)
load_data
return_value = fog.send(*args)
flush_data!
return_value
end
|
Class Method Details
.get_connection ⇒ Object
21
22
23
|
# File 'lib/breeze/fog_wrapper.rb', line 21
def self.get_connection
Fog.mocking? ? new : direct_fog_connection
end
|
Instance Method Details
#flush_data! ⇒ Object
32
33
34
|
# File 'lib/breeze/fog_wrapper.rb', line 32
def flush_data!
File.open(data_file, 'w') { |f| YAML::dump(get_data, f) }
end
|