Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/motion_model/ext.rb
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#except(*keys) ⇒ Object
Returns the contents of the hash, with the exception of the keys specified in the keys array.
Instance Method Details
#empty? ⇒ Boolean
240 241 242 |
# File 'lib/motion_model/ext.rb', line 240 def empty? self.length < 1 end |
#except(*keys) ⇒ Object
Returns the contents of the hash, with the exception of the keys specified in the keys array.
246 247 248 |
# File 'lib/motion_model/ext.rb', line 246 def except(*keys) self.dup.reject{|k, v| keys.include?(k)} end |