Class: CaptainHoog::Env
- Inherits:
-
Hash
- Object
- Hash
- CaptainHoog::Env
show all
- Defined in:
- lib/captain_hoog/env.rb
Instance Method Summary
collapse
Methods inherited from Hash
#stringify_keys
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth_name, *args, &block) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/captain_hoog/env.rb', line 4
def method_missing(meth_name, *args, &block)
if self.has_key?(meth_name)
return self[meth_name]
else
super
end
end
|
Instance Method Details
#respond_to_missing?(meth_name, include_private = false) ⇒ Boolean
12
13
14
|
# File 'lib/captain_hoog/env.rb', line 12
def respond_to_missing?(meth_name, include_private = false)
self.has_key?(meth_name) || super
end
|