module ArrayHash

Public Instance Methods

access(symbol) click to toggle source
# File lib/bucket_client/digital_ocean/digital_ocean_client.rb, line 13
def access(symbol)
        raise ArgumentError "Cannot find symbol #{symbol.to_s}" unless has_key symbol
        r = find {|x| !x[symbol].nil?}[symbol]
        r.extend(ArrayHash)
        r
end
get(symbol) click to toggle source
# File lib/bucket_client/digital_ocean/digital_ocean_client.rb, line 20
def get(symbol)
        raise ArgumentError "Cannot find symbol #{symbol.to_s}" if self[symbol].nil?
        r = self[symbol]
        r.extend(ArrayHash)
        r
end
has_key(symbol) click to toggle source
# File lib/bucket_client/digital_ocean/digital_ocean_client.rb, line 27
def has_key(symbol)
        self.any? {|x| !x[symbol].nil?}
end