Class: Array
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#extract_options! ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/yandex-webmaster/core_ext/array.rb', line 4 def if last.is_a?(Hash) && last. pop else {} end end |
#wrap(object) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/yandex-webmaster/core_ext/array.rb', line 13 def wrap(object) if object.nil? [] elsif object.respond_to?(:to_ary) object.to_ary || [object] else [object] end end |