Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/hard_boiled/extract_options.rb
Overview
Somebody said, I won’t depend on ‘ActiveSupport` for one method. Ok these are two but still… taken from the [rails project](github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/array/extract_options.rb)
Instance Method Summary collapse
-
#extractable_options? ⇒ Boolean
By default, only instances of Hash itself are extractable.
Instance Method Details
#extractable_options? ⇒ Boolean
By default, only instances of Hash itself are extractable. Subclasses of Hash may implement this method and return true to declare themselves as extractable. If a Hash is extractable, Array#extract_options! pops it from the Array when it is the last element of the Array.
10 11 12 |
# File 'lib/hard_boiled/extract_options.rb', line 10 def instance_of?(Hash) end |