Class: TripAdvisor::Translation::LocalizationsArray
- Inherits:
-
Array
- Object
- Array
- TripAdvisor::Translation::LocalizationsArray
- Defined in:
- lib/trip_advisor/translation.rb
Overview
Supports keyed lookup by locale identifier
Instance Method Summary collapse
Instance Method Details
#[](locale_identifier) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/trip_advisor/translation.rb', line 11 def [](locale_identifier) if locale_identifier.is_a?(String) self.detect { |localization| localization.locale_identifier == locale_identifier.to_s } else super end end |