class Array
History: Stolen wholesale from ActiveSupport.
History: Stolen wholesale from ActiveSupport.
Array#first! 20060630
Description: Sometimes it makes more sense to treat arrays this way.
Discussion: This and last! were taken from Skink2Quick from a few months ago.
Array#last! 20060630
Description: Sometimes it makes more sense to treat arrays this way.
Discussion: This and first! were taken from Skink2Quick from a few months ago.
Public Instance Methods
all_but_first()
click to toggle source
# File lib/ImpURI/Array/all_but_first.rb, line 5 def all_but_first d = self.dup d.first! d end
all_but_last()
click to toggle source
# File lib/ImpURI/Array/all_but_last.rb, line 18 def all_but_last d = self.dup d.last! d end
extract_options!()
click to toggle source
# File lib/ImpURI/Array/extract_optionsX.rb, line 10 def extract_options! last.is_a?(::Hash) ? pop : {} end