Module: Silencer::Util
- Included in:
- Rack::Logger, Rails::Logger
- Defined in:
- lib/silencer/util.rb
Class Method Summary collapse
Class Method Details
.extract_options!(args) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/silencer/util.rb', line 15 def (args) if args.last.is_a?(Hash) args.pop else {} end end |
.wrap(object) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/silencer/util.rb', line 5 def wrap(object) if object.nil? [] elsif object.respond_to?(:to_ary) object.to_ary || [object] else [object] end end |