Class: Rack::Filter
- Inherits:
-
Object
- Object
- Rack::Filter
- Defined in:
- lib/rack/filter_param/filter.rb
Instance Attribute Summary collapse
-
#if_proc ⇒ Object
readonly
Returns the value of attribute if_proc.
-
#param ⇒ Object
readonly
Returns the value of attribute param.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(options) ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
#initialize(options) ⇒ Filter
Returns a new instance of Filter.
5 6 7 8 9 10 11 12 13 |
# File 'lib/rack/filter_param/filter.rb', line 5 def initialize() if .is_a?(Hash) @param = parse_param([:param]) @path = [:path] @if_proc = [:if] else @param = parse_param() end end |
Instance Attribute Details
#if_proc ⇒ Object (readonly)
Returns the value of attribute if_proc.
3 4 5 |
# File 'lib/rack/filter_param/filter.rb', line 3 def if_proc @if_proc end |
#param ⇒ Object (readonly)
Returns the value of attribute param.
3 4 5 |
# File 'lib/rack/filter_param/filter.rb', line 3 def param @param end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/rack/filter_param/filter.rb', line 3 def path @path end |