lib/ProMotion/map/map_screen_annotation.rb in ProMotion-map-0.3.0 vs lib/ProMotion/map/map_screen_annotation.rb in ProMotion-map-0.4.0

- old
+ new

@@ -1,7 +1,8 @@ module ProMotion class MapScreenAnnotation + attr_reader :params # Creates the new annotation object def initialize(params = {}) @params = params set_defaults @@ -45,21 +46,22 @@ else @coordinate = new_coordinate end end - # Allows for retrieving your own custom values on the annotation - def annotation_params - @params - end - def method_missing(meth, *args) if @params[meth.to_sym] @params[meth.to_sym] else PM.logger.warn "The annotation parameter \"#{meth}\" does not exist on this pin." nil end + end + + # Deprecated + def annotation_params + PM.logger.warn("annotation.annotation_params is deprecated and will be removed soon. Please use annotation.params instead.") + @params end end end