Module: Pragma::Operation::Macro::Decorator

Defined in:
lib/pragma/operation/macro/decorator.rb

Class Method Summary collapse

Class Method Details

.for(_input, name, options) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/pragma/operation/macro/decorator.rb', line 13

def for(_input, name, options)
  set_defaults(options)

  return false unless validate_params(options)

  options["result.decorator.#{name}"] = options["decorator.#{name}.class"].new(
    options['model']
  )

  validate_expansion(options, name)
end