Class: SgPostcode::Array
- Inherits:
-
Object
- Object
- SgPostcode::Array
- Defined in:
- lib/sg_postcode/array.rb
Instance Method Summary collapse
-
#convert ⇒ { long: '123456', lat: '123456' }, ...
Convert to a long lat array.
-
#initialize(postcodes, opts = {}) ⇒ Array
constructor
Init a new array object.
Constructor Details
#initialize(postcodes, opts = {}) ⇒ Array
Init a new array object
11 12 13 14 |
# File 'lib/sg_postcode/array.rb', line 11 def initialize(postcodes, opts = {}) @postcodes = postcodes @opts = opts end |
Instance Method Details
#convert ⇒ { long: '123456', lat: '123456' }, ...
Convert to a long lat array
SgPostcode::Array.new(postcodes).convert
26 27 28 |
# File 'lib/sg_postcode/array.rb', line 26 def convert LongLatConverter.new(@postcodes, @opts).convert end |