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

Disambiguator concern #176

Merged
merged 6 commits into from
Nov 6, 2016
Merged

Disambiguator concern #176

merged 6 commits into from
Nov 6, 2016

Conversation

irvinlim
Copy link

@irvinlim irvinlim commented Nov 6, 2016

I extracted out much of the string replacement logic from ClearController into a Disambiguator concern, since the token replacement should be the same in both ClearController and ListController.

Also, I added a getUnknownTokenString method which extracts default token, and made the controllers handle them if they exist.

Partial #175

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 60.451% when pulling 367ab2d on disambiguator into 7a432d1 on master.

* Extracts the key or value of the token value array, and returns it.
* Accepts a placeholder string in the event that the key or value doesn't exist.
*/
private static String extractKeyOrValue(Map<String, String[]> parsedResult, boolean extractValue, String key, String placeholder) {
Copy link

Choose a reason for hiding this comment

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

This is actually used everywhere in all the controllers, we can consider moving this to a general Tokenizer static method.

@louietyj louietyj merged commit 9fdd913 into master Nov 6, 2016
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.

None yet

3 participants