Sha256: 3c9727a13f4afaeacfe610416b3a4055d21037acd37ecd4296f62449ba4de101

Contents?: true

Size: 242 Bytes

Versions: 22

Compression:

Stored size: 242 Bytes

Contents

require 'sinatra/base'

##
# Adds to Sinatra +controller+ informations
#
class Sinatra::Request
  attr_accessor :route_obj

  def controller
    route_obj && route_obj.controller
  end
  def action
    route_obj && route_obj.action
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
padrino-core-0.16.0.pre3 lib/padrino-core/ext/sinatra.rb
padrino-core-0.16.0.pre2 lib/padrino-core/ext/sinatra.rb
padrino-core-0.15.3 lib/padrino-core/ext/sinatra.rb
padrino-core-0.15.2 lib/padrino-core/ext/sinatra.rb
padrino-core-0.15.1 lib/padrino-core/ext/sinatra.rb
padrino-core-0.15.0 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.4 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.3 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.2 lib/padrino-core/ext/sinatra.rb
padrino-core-0.13.3.4 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.1.1 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.1 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.0.2 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.0.1 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.0 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.0.rc2 lib/padrino-core/ext/sinatra.rb
padrino-core-0.14.0.rc1 lib/padrino-core/ext/sinatra.rb
padrino-core-0.13.3.3 lib/padrino-core/ext/sinatra.rb
padrino-core-0.13.3.2 lib/padrino-core/ext/sinatra.rb
padrino-core-0.13.3.1 lib/padrino-core/ext/sinatra.rb