lib/ine/places/autonomous_region.rb in ine-places-0.2.0 vs lib/ine/places/autonomous_region.rb in ine-places-0.3.0

- old
+ new

@@ -3,9 +3,17 @@ def provinces INE::Places::Province.find_all_by_autonomous_region_id(self.id) end + def name(locale = nil) + if locale == :ca + self['name_ca'] + else + self['name'] + end + end + private def self.collection_klass INE::Places::AutonomousRegionsCollection end