Class: Rack::EncodingGuard::Strategy

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/encoding_guard/strategy.rb

Direct Known Subclasses

RejectStrategy, SanitizeStrategy

Constant Summary collapse

PROCESSIBLE_KEYS =
%w(
  HTTP_REFERER
  PATH_INFO
  REQUEST_URI
  REQUEST_PATH
  QUERY_STRING
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Strategy

Returns a new instance of Strategy.



14
15
16
# File 'lib/rack/encoding_guard/strategy.rb', line 14

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



12
13
14
# File 'lib/rack/encoding_guard/strategy.rb', line 12

def options
  @options
end

Instance Method Details

#process(env) ⇒ Object



18
19
20
# File 'lib/rack/encoding_guard/strategy.rb', line 18

def process(env)
  yield
end