Class: Hashie::Mash
- Inherits:
-
Object
- Object
- Hashie::Mash
- Defined in:
- lib/gmail/message.rb
Instance Method Summary collapse
Instance Method Details
#find_all_object_containing(key, value) ⇒ Object
226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/gmail/message.rb', line 226 def find_all_object_containing(key, value ) result=[] if self.send(key) == value result << self end self.values.each do |vs| vs = [vs] unless vs.is_a? Array vs.each do |v| result += v.find_all_object_containing(key,value) if v.is_a? Hashie::Mash end end result end |