Class: Hash
- Inherits:
-
Object
show all
- Defined in:
- lib/AWS.rb
Overview
A custom implementation of Hash that allows us to access hash values using dot notation
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
26
27
28
29
30
|
# File 'lib/AWS.rb', line 26
def method_missing(meth, *args, &block)
if args.size == 0
self[meth.to_s] || self[meth.to_sym]
end
end
|
Instance Method Details
#does_not_have?(key) ⇒ Boolean
40
41
42
|
# File 'lib/AWS.rb', line 40
def does_not_have?(key)
self[key].nil? || self[key].to_s.empty?
end
|
#has?(key) ⇒ Boolean
36
37
38
|
# File 'lib/AWS.rb', line 36
def has?(key)
self[key] && !self[key].to_s.empty?
end
|
#type ⇒ Object
32
33
34
|
# File 'lib/AWS.rb', line 32
def type
self['type']
end
|