Module: RapidApi::ActionController::Scope::ClassMethods
- Defined in:
- lib/rapid_api/action_controller/scope.rb
Instance Attribute Summary collapse
-
#scope_by_proc ⇒ Object
Returns the value of attribute scope_by_proc.
-
#scope_params ⇒ Object
Returns the value of attribute scope_params.
Instance Method Summary collapse
Instance Attribute Details
#scope_by_proc ⇒ Object
Returns the value of attribute scope_by_proc.
30 31 32 |
# File 'lib/rapid_api/action_controller/scope.rb', line 30 def scope_by_proc @scope_by_proc end |
#scope_params ⇒ Object
Returns the value of attribute scope_params.
30 31 32 |
# File 'lib/rapid_api/action_controller/scope.rb', line 30 def scope_params @scope_params end |
Instance Method Details
#scope_by(*params, &block) ⇒ Object
36 37 38 39 |
# File 'lib/rapid_api/action_controller/scope.rb', line 36 def scope_by(*params, &block) self.scope_by_proc = Proc.new { |p| block.call(p) } [*params].each { |p| self.scope_params << p } end |