Sha256: 3934a90d6986b69f5d4fa716bc16a1d3c761ddd12006329376cd03e89544b0c0
Contents?: true
Size: 552 Bytes
Versions: 1
Compression:
Stored size: 552 Bytes
Contents
module Strings require_relative "strings/to_export" RubyLambdas::Strings::ToExport.tap do |to_export| to_export .constants .reject { |const| const == :ALIASES } .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.1.0 | lib/ruby/lambdas/strings.rb |