Module: QAT::Web::Elements::Config
Overview
Configuration handling helper
Instance Method Summary collapse
-
#valid_config?(config, collection) ⇒ Boolean
Validates that the given config is in the correct format.
Instance Method Details
#valid_config?(config, collection) ⇒ Boolean
Validates that the given config is in the correct format
10 11 12 13 14 15 |
# File 'lib/qat/web/elements/config.rb', line 10 def valid_config?(config, collection) unless config.kind_of?(Hash) && config.any? raise(ArgumentError, "Empty or invalid configuration was given for #{collection.capitalize}! A hash like configuration is expected!") end true end |