Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GroovyDoc and propertyMissing methods #27

Merged
merged 4 commits into from
Oct 16, 2019
Merged

GroovyDoc and propertyMissing methods #27

merged 4 commits into from
Oct 16, 2019

Conversation

SPalominos
Copy link
Contributor

@SPalominos SPalominos commented Oct 15, 2019

Add groovyDoc in OSMTools and implements propertyMissing methods to simplify the methods call.

@SPalominos SPalominos self-assigned this Oct 15, 2019
public static Utilities = new Utilities()

//Utility methods
static def getUuid() { UUID.randomUUID().toString().replaceAll("-", "_") }
static def uuid = { UUID.randomUUID().toString().replaceAll("-", "_") }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changing this name ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had two declaration of the 'uuid' method:

  • def uuid = {...} was for a normal calling (outside a String) by using uuid()
  • def getUuid() {...} was for calling inside a String by using "$uuid

Now with the propertyMissing method, there is only one implementation which works everywheren and which is more compliant with the groovy syntax/mecanism

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix in a better way with just static def getUuid(){...}.

osm/src/main/groovy/org/orbisgis/osm/Transform.groovy Outdated Show resolved Hide resolved
@ebocher ebocher merged commit 90596e0 into orbisgis:master Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants