2
module Understandable #:nodoc:
3
module ClassMethods #:nodoc:
5
understandings.concat args
12
def all_understandings
13
return understandings + self.superclass.all_understandings if self.superclass.respond_to? :all_understandings
18
def self.included(klass)
19
klass.extend ClassMethods
22
def must_understand(hash)
23
invalid_options = hash.inject([]) do |errors, (key, value)|
24
errors << key.to_s unless self.class.all_understandings.include?(key)
27
raise ArgumentError.new("invalid options: #{invalid_options.join(', ')}") if invalid_options.any?
b'\\ No newline at end of file'