struct Amber::Controller::FilterBuilder
- Amber::Controller::FilterBuilder
- Struct
- Value
- Object
Overview
Builds a BeforeAction filter.
The yielded object has an #only
method that accepts two arguments,
a key (Symbol
) and a block ->Nil
.
FilterChainBuilder.build do |b|
filter :index, :show { some_method }
filter :delete { }
end
Defined in:
amber/controller/filters.crConstructors
Instance Method Summary
- #add(action, &block : -> Nil)
- #all(&block : -> Nil)
- #clone
- #copy_with(filters _filters = @filters, precedence _precedence = @precedence)
- #except(action : Symbol, &block : -> Nil)
- #except(actions : Array(Symbol), &block : -> Nil)
- #filters : Filters
- #only(action : Symbol, &block : -> Nil)
- #only(actions : Array(Symbol), &block : -> Nil)
- #precedence : Symbol