Class: Cloudkicker::Marker
- Inherits:
-
Object
- Object
- Cloudkicker::Marker
- Defined in:
- lib/critical_juncture/markers/marker.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Marker
constructor
A new instance of Marker.
Constructor Details
#initialize(options = {}) ⇒ Marker
Returns a new instance of Marker.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/critical_juncture/markers/marker.rb', line 4 def initialize(={}) raise 'Map is required' unless [:map] raise 'Lat is required' unless [:lat] raise 'Long is required' unless [:long] @map = .delete(:map) @lat = .delete(:lat) @long = .delete(:long) @id = self.object_id @title = .delete(:title) || '' @info = .delete(:info) || '' @info.gsub!(/\s+/, ' ') @max_width = .delete(:info_max_width) || 400 add_marker end |