Module: Rack::IpRestrictor

Defined in:
lib/rack_ip_restrictor.rb,
lib/rack_ip_restrictor/config.rb,
lib/rack_ip_restrictor/ip_group.rb,
lib/rack_ip_restrictor/restriction.rb

Overview

namespace IpRestrictor

Defined Under Namespace

Classes: Config, IpGroup, Middleware, Restriction

Class Attribute Summary (collapse)

Class Method Summary (collapse)

Class Attribute Details

+ (Object) config (readonly)

Returns the value of attribute config



9
10
11
# File 'lib/rack_ip_restrictor.rb', line 9

def config
  @config
end

Class Method Details

+ (Object) configure(&block)



12
13
14
15
# File 'lib/rack_ip_restrictor.rb', line 12

def configure(&block)
  @config = IpRestrictor::Config.new
  @config.instance_eval &block
end

+ (Middleware) middleware

Rack middleware



19
20
21
# File 'lib/rack_ip_restrictor.rb', line 19

def middleware
  IpRestrictor::Middleware
end