Class: Hash

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

Instance Method Summary collapse

Instance Method Details

#contains_keys?(keys) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
# File 'lib/argshelper.rb', line 9

def contains_keys?(keys)
	keys.any? do |key|
		self.key?(key)
	end
end

#has_blank?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/argshelper.rb', line 5

def has_blank?
	self.values.any?{|v| v.nil? || v.length == 0}
end