class ActiveResource::InheritingHash

Public Class Methods

new(parent_hash = {}) click to toggle source
Calls superclass method
# File lib/active_resource/inheriting_hash.rb, line 5
def initialize(parent_hash = {})
  # Default hash value must be nil, which allows fallback lookup on parent hash
  super(nil)
  @parent_hash = parent_hash
end

Public Instance Methods

[](key) click to toggle source
Calls superclass method
# File lib/active_resource/inheriting_hash.rb, line 11
def [](key)
  super || @parent_hash[key]
end