mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-24 09:13:24 +08:00
Implement method_missing on the map annotations to try and return a parameter named what the user asked for.
This commit is contained in:
@@ -52,5 +52,13 @@ module ProMotion
|
||||
@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."
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user