Sha256: 061960207acfb9cabd0517d61e58b4acb42d60053219f606ee0056452171170b

Contents?: true

Size: 304 Bytes

Versions: 4

Compression:

Stored size: 304 Bytes

Contents

module HasPrice
  module CoreExtensions
    module Array
      # In case we're not in Rails.
      #
      # @see http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/ExtractOptions.html#M001202
      def extract_options!
        last.is_a?(::Hash) ? pop : {}
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
has_price-1.2.0 lib/has_price/core_extensions/array.rb
has_price-1.1.1 lib/has_price/core_extensions/array.rb
has_price-1.1.0 lib/has_price/core_extensions/array.rb
has_price-1.0.0 lib/has_price/core_extensions/array.rb