Class: Sinatra::REST::CustomController

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra/rest.rb

Overview

used as context to evaluate the controller's module

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (CustomController) initialize(prefix)



184
185
186
187
# File 'lib/sinatra/rest.rb', line 184

def initialize(prefix)
  @prefix = prefix
  @module = Module.new
end

Instance Attribute Details

- (Object) module (readonly)

Returns the value of attribute module



182
183
184
# File 'lib/sinatra/rest.rb', line 182

def module
  @module
end

Instance Method Details

- (Object) after(options = {}, &block)



190
# File 'lib/sinatra/rest.rb', line 190

def after(options={}, &block)   prefix :after,   █ end

- (Object) before(options = {}, &block)



189
# File 'lib/sinatra/rest.rb', line 189

def before(options={}, &block)  prefix :before,  █ end

- (Object) create(options = {}, &block)



193
# File 'lib/sinatra/rest.rb', line 193

def create(options={}, &block)  prefix :create,  █ end

- (Object) destroy(options = {}, &block)



197
# File 'lib/sinatra/rest.rb', line 197

def destroy(options={}, &block) prefix :destroy, █ end

- (Object) edit(options = {}, &block)



195
# File 'lib/sinatra/rest.rb', line 195

def edit(options={}, &block)    prefix :edit,    █ end

- (Object) index(options = {}, &block)



191
# File 'lib/sinatra/rest.rb', line 191

def index(options={}, &block)   prefix :index,   █ end

- (Object) new(options = {}, &block)



192
# File 'lib/sinatra/rest.rb', line 192

def new(options={}, &block)     prefix :new,     █ end

- (Object) show(options = {}, &block)



194
# File 'lib/sinatra/rest.rb', line 194

def show(options={}, &block)    prefix :show,    █ end

- (Object) update(options = {}, &block)



196
# File 'lib/sinatra/rest.rb', line 196

def update(options={}, &block)  prefix :update,  █ end