Class: Clowne::Utils::Params
- Inherits:
-
Object
- Object
- Clowne::Utils::Params
- Defined in:
- lib/clowne/utils/params.rb
Overview
:nodoc: all
Defined Under Namespace
Classes: BaseProxy, BlockProxy, KeyProxy, NullProxy, PassProxy
Class Method Summary collapse
Class Method Details
.proxy(value) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/clowne/utils/params.rb', line 50 def proxy(value) if value == true PassProxy elsif value.nil? || value == false NullProxy elsif value.is_a?(Proc) BlockProxy else KeyProxy end.new(value) end |