module Flatten::GuardMethods

Methods to ensure Flatten isn't mixed into nonsensical things

Public Instance Methods

extended(base) click to toggle source

Flatten can be extended into instances of Hash @param base [Hash]

# File lib/flatten/guard_methods.rb, line 8
def extended(base)
        unless base.is_a? Hash
                raise ArgumentError, "<#{base.inspect}> is not a Hash!"
        end
end
included(base) click to toggle source

Sparsigy can be included into implementations of Hash @param base [Hash.class]

# File lib/flatten/guard_methods.rb, line 16
def included(base)
        unless base <= Hash
                raise ArgumentError, "<#{base.inspect} does not inherit Hash"
        end
end