Module: RestLinkProcsHelpers

Defined in:
lib/generators/templet/templates/core/spec/support/core/rest_link_procs_helpers.rb

Instance Method Summary collapse

Instance Method Details

#execute(link_proc, model, parent, **opts) ⇒ Object



9
10
11
12
13
# File 'lib/generators/templet/templates/core/spec/support/core/rest_link_procs_helpers.rb', line 9

def execute(link_proc, model, parent, **opts)
  link = link_proc.(renderer, model, parent)

  return link, link[1]
end


3
4
5
6
7
# File 'lib/generators/templet/templates/core/spec/support/core/rest_link_procs_helpers.rb', line 3

def link_procs(**options)
  options.reverse_merge! verify_path: false

  Templet::Links::RestLinkProcs.new(nil, **options)
end