Method: Rack::Cors#allow

Defined in:
lib/rack/cors.rb

#allow(&block) ⇒ Object

[View source]

56
57
58
59
60
61
62
63
64
# File 'lib/rack/cors.rb', line 56

def allow(&block)
  all_resources << (resources = Resources.new)

  if block.arity == 1
    block.call(resources)
  else
    resources.instance_eval(&block)
  end
end