Skip to content

v0.5.1

Choose a tag to compare

@pdobb pdobb released this 12 Nov 04:35
· 37 commits to main since this release

Complete rewrite of Say::InterpolationTemplate.

  • Say::InterpolationTemplate is now defined through piecemeal attributes, instead of by passing in a representative interpolation template String. This allows for very obvious and fine-grained control of which parts of the template are which.
  • Add the ability to specify left/right bookends on Say::InterpolationTemplate. These allow for specifying text that should always appear on the left/right end of the interpolated text, regardless of length restrictions.

Remove the Say::LJBanner, Say::CJBanner, and Say::RJBanner classes.

  • Instead, we now have Say::JustifierBehaviors and implementing classes: Say::LeftJustifier, Say::CenterJustifier, and Say::RightJustifier.
  • These new classes are internally instantiated when calling Say::InterpolationTemplate#left_justify, Say::InterpolationTemplate#center_justify, and Say::InterpolationTemplate#right_justify, respectively.

Updates to README to show advanced usage using the newly rewritten Say::InterpolationTemplate class.

Public API Updates!

  • Add Say.<type> convenience methods. These are single-argument alternatives to Say.line(text, type):
    • Say.debug("TEST") # => " >> TEST"
    • Say.error("TEST") # => " ** TEST"
    • Say.info("TEST") # => " -- TEST"
    • Say.success("TEST") # => " -> TEST"
    • Say.warn("TEST") # => " !¡ TEST"