Skip to content

1.7.0

Choose a tag to compare

@joeldrapper joeldrapper released this 15 Apr 17:08
· 36 commits to main since this release
21c577b

Highlights

New _Predicate type

We added a new _Predicate type which essentially combines a proc with a description. You can use it like this:

_Predicate("Starts with 'Hello'") { it.start_with?("Hello") }

after_initialize can now be privately scoped

private def after_initialize
  # do stuff here
end

[Experimental] Literal::Value and Literal::Delegator classes

Literal::Value and Literal::Delegator are new abstractions for single-value objects. Here’s an example of Literal::Value.

class EmailAddress < Literal::Value(String)
  delegate :length

  def domain
    value.split("@").last
  end
end

Literal::Delegator is similar except it delegates all missing methods to the underlying value. We’ll post more documentation soon.

PRs

New Contributors

  • @ixti made their first contribution in #301

Full Changelog: 1.6.0...1.7.0