Class: StaticGmaps::Location
- Inherits:
-
Object
- Object
- StaticGmaps::Location
- Defined in:
- lib/static_gmaps2.rb
Overview
Marker
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(coordinates_array_or_address) ⇒ Location
constructor
A new instance of Location.
- #to_s ⇒ Object
Constructor Details
#initialize(coordinates_array_or_address) ⇒ Location
Returns a new instance of Location.
245 246 247 248 249 250 251 |
# File 'lib/static_gmaps2.rb', line 245 def initialize(coordinates_array_or_address) @value = if coordinates_array_or_address.is_a?(String) URI.encode(coordinates_array_or_address) else coordinates_array_or_address end end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
244 245 246 |
# File 'lib/static_gmaps2.rb', line 244 def value @value end |
Instance Method Details
#to_s ⇒ Object
253 254 255 |
# File 'lib/static_gmaps2.rb', line 253 def to_s @value.is_a?(Array) ? @value.join(",") : @value end |