Module: Loaf::OptionsValidator
- Included in:
- ViewExtensions
- Defined in:
- lib/loaf/options_validator.rb
Overview
A mixin to validate configuration options
Instance Method Summary collapse
-
#valid?(options) ⇒ Boolean
Check if options are valid or not.
Instance Method Details
#valid?(options) ⇒ Boolean
Check if options are valid or not
15 16 17 18 19 20 21 22 23 |
# File 'lib/loaf/options_validator.rb', line 15 def valid?() = Loaf::Configuration::VALID_ATTRIBUTES .each_key do |key| unless .include?(key) fail Loaf::InvalidOptions.new(key, ) end end true end |