class GoogleDistanceMatrix::Places
Represents a collection of places
Attributes
places[R]
Public Class Methods
new(places = [])
click to toggle source
# File lib/google_distance_matrix/places.rb, line 8 def initialize(places = []) @places = [] concat Array.wrap(places) end
Public Instance Methods
concat(other)
click to toggle source
# File lib/google_distance_matrix/places.rb, line 26 def concat(other) push(*other) end
Private Instance Methods
ensure_args_are_places(args)
click to toggle source
# File lib/google_distance_matrix/places.rb, line 34 def ensure_args_are_places(args) args.map do |arg| if arg.is_a? Place arg else Place.new arg end end end