<commit_before>= object-let

Defines Object#let, which simply yields the object and returns the result.
This idiom, familiar to Lisp programmers, can be handy to eliminate the need
for an intermediate variable when you need to use the result of a
computation multiple times.

For example, without +let+, you might write:

  biggest = my_things.find_biggest
  bounds = Bound.new(:width => biggest.width, :height => biggest.height)

with +let+, this could be:

  bounds = my_things.find_biggest.let { |biggest|
    Bound.new(:width => biggest.width, :height => biggest.height)
  }


Stylistically, as well in terms of lexical scoping (for ruby 1.9), this
idiom can make clear that the intermediate result is of no importance outside the
block.

= See also

Discussion at http://www.opensourcery.com/blog/zack-hobson/objectlet-ruby-0

Alternative implementation at http://ick.rubyforge.org/inside.html


== Installation

Install via:

   % gem install object-let

or in your Gemfile:

   gem "object-let"

== Copyright

Released under the MIT License.  See LICENSE for details.
<commit_msg>cite the "let" gem<commit_after>= object-let

Defines Object#let, which simply yields the object and returns the result.
This idiom, familiar to Lisp programmers, can be handy to eliminate the need
for an intermediate variable when you need to use the result of a
computation multiple times.

For example, without +let+, you might write:

  biggest = my_things.find_biggest
  bounds = Bound.new(:width => biggest.width, :height => biggest.height)

with +let+, this could be:

  bounds = my_things.find_biggest.let { |biggest|
    Bound.new(:width => biggest.width, :height => biggest.height)
  }


Stylistically, as well in terms of lexical scoping (for ruby 1.9), this
idiom can make clear that the intermediate result is of no importance outside the
block.

= See also

Discussion at http://www.opensourcery.com/blog/zack-hobson/objectlet-ruby-0

Alternative implementation at http://ick.rubyforge.org/inside.html

The "let" gem (https://rubygems.org/gems/let) provides a module that can be
included in a class to define memoizing accessors.  That gem and this one
are compatible.


== Installation

Install via:

   % gem install object-let

or in your Gemfile:

   gem "object-let"

== Copyright

Released under the MIT License.  See LICENSE for details.

{'fraction_non_alphanumeric': 0.08439897698209718, 'fraction_numerical': 0.0025575447570332483, 'mean_word_length': 4.1244541484716155, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '44295', 'n_tokens_mistral': 726, 'n_tokens_neox': 679, 'n_words': 280}