Class: Rack::SSI

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/ssi/version.rb,
lib/rack/ssi.rb

Defined Under Namespace

Classes: Error

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Constructor Details

#initialize(app, options = { :max_depth => 5, :ext => ".shtml", :tag => '(<!--#include virtual="(.*)"\s*-->)' }) ⇒ SSI

Returns a new instance of SSI.



5
6
7
8
9
10
# File 'lib/rack/ssi.rb', line 5

def initialize(app, options={ :max_depth => 5, :ext => ".shtml", :tag => '(<!--#include virtual="(.*)"\s*-->)' } )
  @app        = app
  @max_depth  = options[:max_depth]
  @ext        = options[:ext]
  @tag_regexp = Regexp.new(options[:tag])
end

Instance Method Details

#call(env) ⇒ Object



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

def call(env)
  process_request(env)
end