Sha256: ba246f1be14149eef92775014f9f84c250ef5a4cbc62929943add573a80eb653

Contents?: true

Size: 331 Bytes

Versions: 6

Compression:

Stored size: 331 Bytes

Contents

# ext.rb : some extensions to basic types
#
# Copyright 2009, Grégoire Marabout. All Rights Reserved.
#
# This is free software. Please see the LICENSE and COPYING files for details.

class Array
  def extract_options!
     last.is_a?(::Hash) ? pop : {}
  end
  
  def extract_options
     last.is_a?(::Hash) ? last : {}
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cascading.jruby-0.0.9 lib/cascading/ext/array.rb
cascading.jruby-0.0.8 lib/cascading/ext/array.rb
cascading.jruby-0.0.7 lib/cascading/ext/array.rb
cascading.jruby-0.0.6 lib/cascading/ext/array.rb
cascading.jruby-0.0.5 lib/cascading/ext/array.rb
cascading.jruby-0.0.4 lib/cascading/ext/array.rb