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
-
#module ⇒ Object
readonly
Returns the value of attribute module.
Instance Method Summary collapse
- #after(options = {}, &block) ⇒ Object
- #before(options = {}, &block) ⇒ Object
- #create(options = {}, &block) ⇒ Object
- #destroy(options = {}, &block) ⇒ Object
- #edit(options = {}, &block) ⇒ Object
- #index(options = {}, &block) ⇒ Object
-
#initialize(prefix) ⇒ CustomController
constructor
A new instance of CustomController.
- #new(options = {}, &block) ⇒ Object
- #show(options = {}, &block) ⇒ Object
- #update(options = {}, &block) ⇒ Object
Constructor Details
#initialize(prefix) ⇒ CustomController
Returns a new instance of CustomController.
183 184 185 186 |
# File 'lib/sinatra/rest.rb', line 183 def initialize(prefix) @prefix = prefix @module = Module.new end |
Instance Attribute Details
#module ⇒ Object (readonly)
Returns the value of attribute module.
181 182 183 |
# File 'lib/sinatra/rest.rb', line 181 def module @module end |
Instance Method Details
#after(options = {}, &block) ⇒ Object
189 |
# File 'lib/sinatra/rest.rb', line 189 def after(={}, &block) prefix :after, █ end |
#before(options = {}, &block) ⇒ Object
188 |
# File 'lib/sinatra/rest.rb', line 188 def before(={}, &block) prefix :before, █ end |
#create(options = {}, &block) ⇒ Object
192 |
# File 'lib/sinatra/rest.rb', line 192 def create(={}, &block) prefix :create, █ end |
#destroy(options = {}, &block) ⇒ Object
196 |
# File 'lib/sinatra/rest.rb', line 196 def destroy(={}, &block) prefix :destroy, █ end |
#edit(options = {}, &block) ⇒ Object
194 |
# File 'lib/sinatra/rest.rb', line 194 def edit(={}, &block) prefix :edit, █ end |
#index(options = {}, &block) ⇒ Object
190 |
# File 'lib/sinatra/rest.rb', line 190 def index(={}, &block) prefix :index, █ end |
#new(options = {}, &block) ⇒ Object
191 |
# File 'lib/sinatra/rest.rb', line 191 def new(={}, &block) prefix :new, █ end |
#show(options = {}, &block) ⇒ Object
193 |
# File 'lib/sinatra/rest.rb', line 193 def show(={}, &block) prefix :show, █ end |
#update(options = {}, &block) ⇒ Object
195 |
# File 'lib/sinatra/rest.rb', line 195 def update(={}, &block) prefix :update, █ end |