Class: Jellyfish::Rewrite

Inherits:
Struct
  • Object
show all
Defined in:
lib/jellyfish/rewrite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#appObject

Returns the value of attribute app

Returns:

  • (Object)

    the current value of app



3
4
5
# File 'lib/jellyfish/rewrite.rb', line 3

def app
  @app
end

#toObject

Returns the value of attribute to

Returns:

  • (Object)

    the current value of to



3
4
5
# File 'lib/jellyfish/rewrite.rb', line 3

def to
  @to
end

Instance Method Details

#call(env) ⇒ Object



4
5
6
# File 'lib/jellyfish/rewrite.rb', line 4

def call env
  app.call(env.merge('PATH_INFO' => "#{env['PATH_INFO']}#{to}"))
end