Class: GoogleMapsAPI::DistanceMatrix::Row

Inherits:
Object
  • Object
show all
Defined in:
lib/google_maps_api/distance_matrix/row.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elements) ⇒ Row

Returns a new instance of Row.



4
5
6
# File 'lib/google_maps_api/distance_matrix/row.rb', line 4

def initialize(elements)
  @elements = elements
end

Instance Attribute Details

#elementsObject (readonly)

Returns the value of attribute elements.



2
3
4
# File 'lib/google_maps_api/distance_matrix/row.rb', line 2

def elements
  @elements
end

Class Method Details

.from_hash(hash) ⇒ Object



8
9
10
# File 'lib/google_maps_api/distance_matrix/row.rb', line 8

def self.from_hash(hash)
  self.new(build_elements(hash))
end