module Temple::Mixins::ClassOptions

def default_options

def default_options
  warn 'default_options has been deprecated, use options'
  options
end

def define_deprecated_options(*opts)

def define_deprecated_options(*opts)
  if opts.last.respond_to?(:to_hash)
    hash = opts.pop.to_hash
    options.add_deprecated_keys(hash.keys)
    options.update(hash)
  end
  options.add_deprecated_keys(opts)
end

def define_options(*opts)

def define_options(*opts)
  if opts.last.respond_to?(:to_hash)
    hash = opts.pop.to_hash
    options.add_valid_keys(hash.keys)
    options.update(hash)
  end
  options.add_valid_keys(opts)
end

def disable_option_validator!

def disable_option_validator!
  @option_validator_disabled = true
end

def options

def options
  @options ||= OptionMap.new(superclass.respond_to?(:options) ?
                             superclass.options : nil) do |hash, key, what|
    warn "#{self}: Option #{key.inspect} is #{what}" unless @option_validator_disabled
  end
end

def set_default_options(opts)

def set_default_options(opts)
  warn 'set_default_options has been deprecated, use set_options'
  set_options(opts)
end

def set_options(opts)

def set_options(opts)
  options.update(opts)
end