Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/motion_model/ext.rb

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

Returns:

  • (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