Sha256: 8f300bd848b1e6e484c9fccf55531c3b0b82fe31759553184796525264c47b76

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

module Strings
  require_relative "strings/to_export"

  RubyLambdas::Strings::ToExport.tap do |to_export|
    to_export
      .constants
      .each do |function_name|
        function = to_export.const_get(function_name)

        const_set(
          function_name,
          function.arity == 1 ? function : function.curry
        )
      end
  end

  RubyLambdas::Strings::ALIASES
    .each do |name, new_names|
      Array(new_names).each { |new_name| const_set(new_name, const_get(name)) }
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-lambdas-0.2.0 lib/ruby/lambdas/strings.rb