Module: UseCases::ModuleOptins::Authorized::DSL

Defined in:
lib/use_cases/module_optins/authorized.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{
  failure: :unauthorized,
  failure_message: "Not Authorized",
  merge_input_as: :resource
}.freeze

Instance Method Summary collapse

Instance Method Details

#authorize(name, options = {}) ⇒ Object



22
23
24
25
26
# File 'lib/use_cases/module_optins/authorized.rb', line 22

def authorize(name, options = {})
  options = DEFAULT_OPTIONS.merge(options)

  check name, options
end