Exception: Waves::Response::Packaged

Inherits:
Exception
  • Object
show all
Defined in:
lib/waves/response/packaged.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[](status) ⇒ Object



5
6
7
8
9
# File 'lib/waves/response/packaged.rb', line 5

def self.[]( status )
  Class.new( self ) do 
    define_method( :status ) { status }
  end
end

Instance Method Details

#call(response) ⇒ Object



10
11
12
# File 'lib/waves/response/packaged.rb', line 10

def call( response )
  response.status = status.to_s
end

#messageObject



13
14
15
# File 'lib/waves/response/packaged.rb', line 13

def message
  "HTTP Reponse #{status}"
end