Class: Rack::SSI
- Inherits:
-
Object
- Object
- Rack::SSI
- 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
- #call(env) ⇒ Object
-
#initialize(app, options = { :max_depth => 5, :ext => ".shtml", :tag => '(<!--#include virtual="(.*)"\s*-->)' }) ⇒ SSI
constructor
A new instance of SSI.
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, ={ :max_depth => 5, :ext => ".shtml", :tag => '(<!--#include virtual="(.*)"\s*-->)' } ) @app = app @max_depth = [:max_depth] @ext = [:ext] @tag_regexp = Regexp.new([: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 |