Class methods to add to including applications
An Array of access control tuples of the form:
[ <uri_pattern>, <options_hash> ]
Extension hook. Add instance variables to extended classes.
# File lib/strelka/app/cors.rb, line 35
def self::extended( mod )
mod.instance_variable_set( :@access_controls, [] )
end
Get/declare access control rules for requests whose app_path matches the
specified uri_pattern
, and whose other attributes match the
given options
.
# File lib/strelka/app/cors.rb, line 48
def access_control( uri_pattern=nil, **options, &block )
options[ :block ] = block if block
self.access_controls << [ uri_pattern, options ]
end