Module: Pragma::Macro::Decorator

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

Class Method Summary collapse

Class Method Details

.for(_input, name, options) ⇒ Object



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

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