Module: VarBlock::GetvarHandlers::DefaultHandler

Defined in:
lib/var_block/getvar_handlers.rb

Class Method Summary collapse

Class Method Details

.handle(value, options = []) ⇒ Object

Raises:

  • (ArgumentError)


9
10
11
12
13
14
# File 'lib/var_block/getvar_handlers.rb', line 9

def self.handle(value, options = [])
  supported_options = []
  unsupported_options = options - supported_options
  raise ArgumentError, "#{unsupported_options.map(&:inspect).join(', ')} option(s) are not supported on non-merged variables" if unsupported_options.any?
  value
end