Class: Sinatra::REST::CustomController
- Inherits:
-
Object
- Object
- Sinatra::REST::CustomController
- Defined in:
- lib/sinatra/rest.rb
Overview
used as context to evaluate the controller's module
Instance Attribute Summary (collapse)
-
- (Object) module
readonly
Returns the value of attribute module.
Instance Method Summary (collapse)
- - (Object) after(options = {}, &block)
- - (Object) before(options = {}, &block)
- - (Object) create(options = {}, &block)
- - (Object) destroy(options = {}, &block)
- - (Object) edit(options = {}, &block)
- - (Object) index(options = {}, &block)
-
- (CustomController) initialize(prefix)
constructor
A new instance of CustomController.
- - (Object) new(options = {}, &block)
- - (Object) show(options = {}, &block)
- - (Object) update(options = {}, &block)
Constructor Details
- (CustomController) initialize(prefix)
A new instance of CustomController
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(={}, &block) prefix :after, █ end |
- (Object) before(options = {}, &block)
189 |
# File 'lib/sinatra/rest.rb', line 189 def before(={}, &block) prefix :before, █ end |
- (Object) create(options = {}, &block)
193 |
# File 'lib/sinatra/rest.rb', line 193 def create(={}, &block) prefix :create, █ end |
- (Object) destroy(options = {}, &block)
197 |
# File 'lib/sinatra/rest.rb', line 197 def destroy(={}, &block) prefix :destroy, █ end |
- (Object) edit(options = {}, &block)
195 |
# File 'lib/sinatra/rest.rb', line 195 def edit(={}, &block) prefix :edit, █ end |
- (Object) index(options = {}, &block)
191 |
# File 'lib/sinatra/rest.rb', line 191 def index(={}, &block) prefix :index, █ end |
- (Object) new(options = {}, &block)
192 |
# File 'lib/sinatra/rest.rb', line 192 def new(={}, &block) prefix :new, █ end |
- (Object) show(options = {}, &block)
194 |
# File 'lib/sinatra/rest.rb', line 194 def show(={}, &block) prefix :show, █ end |
- (Object) update(options = {}, &block)
196 |
# File 'lib/sinatra/rest.rb', line 196 def update(={}, &block) prefix :update, █ end |