Class: Mongrel::HttpRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/raw/adapter/mongrel.rb

Overview

:nodoc: all

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/raw/adapter/mongrel.rb', line 15

def method_missing(name, *args)
  if @params.has_key?(name.to_s.upcase)
    return @params[name.to_s.upcase]
  elsif name.to_s =~ /\A(.*)=\Z/ && @params.has_key?($1.upcase)
    @params[$1.upcase] = args[0]
  else
    super
  end
end