Module: Hashie::Extensions::MethodAccessWithOverride

Defined in:
lib/hashie/extensions/method_access.rb

Overview

A macro module that will automatically include MethodReader, MethodOverridingWriter, and MethodQuery, giving you the ability to read, write, and query keys in a hash using method call shortcuts that can override object methods. Any overridden object method is automatically aliased with two leading underscores.

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



235
236
237
238
239
240
# File 'lib/hashie/extensions/method_access.rb', line 235

def self.included(base)
  [MethodReader, MethodOverridingWriter,
   MethodQuery, MethodOverridingInitializer].each do |mod|
    base.send :include, mod
  end
end