Class: Pilipinas::City
Overview
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#barangays ⇒ Array<Barangay>
Returns the barangays belonging to this city or municipality.
Methods inherited from Base
#==, all, assoc_collection, count, find_by, find_by_code, find_by_name, first, #hash, #initialize, #inspect, last, method_missing, reset_cache, respond_to_missing?, #to_s
Constructor Details
This class inherits a constructor from Pilipinas::Base
Instance Method Details
#barangays ⇒ Array<Barangay>
Returns the barangays belonging to this city or municipality.
Results are cached after the first call.
18 19 20 |
# File 'lib/pilipinas/city.rb', line 18 def Barangay.assoc_collection(code: code, dir: :cities) end |