diff options
author | Michael Herold <michael.j.herold@gmail.com> | 2017-02-10 19:29:02 -0600 |
---|---|---|
committer | Michael Herold <michael.j.herold@gmail.com> | 2017-02-10 19:36:20 -0600 |
commit | 9636f682644cb34e69dcaa0c01693c7dc0ba0d1b (patch) | |
tree | 26b19e8f42de64cd089b73fc00c3cc2148c18559 /lib | |
parent | aef1b46e3a4bb7dfa5465160fcb356eebe729269 (diff) | |
download | hashie-9636f682644cb34e69dcaa0c01693c7dc0ba0d1b.tar.gz |
Carry over disabling warnings to subclasses
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hashie/mash.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb index d6b0aed..4008feb 100644 --- a/lib/hashie/mash.rb +++ b/lib/hashie/mash.rb @@ -86,6 +86,15 @@ module Hashie !!@disable_warnings end + # Inheritance hook that sets class configuration when inherited. + # + # @api semipublic + # @return [void] + def self.inherited(subclass) + super + subclass.disable_warnings if disable_warnings? + end + def self.load(path, options = {}) @_mashes ||= new |