Skip to content

Instantly share code, notes, and snippets.

@jamiebullock
Created January 23, 2020 20:23
Show Gist options
  • Save jamiebullock/90740d650980b7a36c388eba42c6c22c to your computer and use it in GitHub Desktop.
Save jamiebullock/90740d650980b7a36c388eba42c6c22c to your computer and use it in GitHub Desktop.
Separating levels of abstraction
public String render() throws Exception
{
HtmlTag hr = new HtmlTag("hr");
if (extraDashes > 0)
hr.addAttribute("size", hrSize(extraDahses));
return hr.html();
}
private String hrSize(int height)
{
int hrSize = height + 1;
return String.format("%d", hrSize);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment