Class: ResourceCollection
- Inherits:
-
Array
- Object
- Array
- ResourceCollection
- Defined in:
- lib/nordea/resources.rb
Instance Method Summary collapse
Instance Method Details
#[](account_name) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/nordea/resources.rb', line 8 def [](account_name) if account_name.is_a?(String) detect { |e| e.name == account_name } elsif account_name.is_a?(Regexp) detect { |e| e.name =~ account_name } else super end end |