README.adoc in refinements-10.0.1 vs README.adoc in refinements-10.1.0
- old
+ new
@@ -3,11 +3,11 @@
:figure-caption!:
= Refinements
Refinements are a collection primitive Ruby objects enhancements without needing to resort to hard
-to debug link:https://www.alchemists.io/articles/ruby_antipatterns/#_monkey_patches[monkey patches].
+to debug link:https://alchemists.io/articles/ruby_antipatterns/#_monkey_patches[monkey patches].
These refinements give you additional syntactic sugar to develop clean and concise implementations
while using less code. By refining our code we can acquire the functionality we wish the core
primitives had!
toc::[]
@@ -29,11 +29,11 @@
* Structs
== Requirements
. https://www.ruby-lang.org[Ruby].
-. A solid understanding of link:https://www.alchemists.io/articles/ruby_refinements[Ruby refinements
+. A solid understanding of link:https://alchemists.io/articles/ruby_refinements[Ruby refinements
and lexical scope].
== Setup
To install, run:
@@ -758,10 +758,24 @@
logger = Logger.new $stdout
logger.write "Test."
logger.reread # ""
----
+===== #any
+
+Allows you to log _any_ message which is identical in behavior and functionality to the `Logger#unknown` method only this requires less typing and better matches the terminology used by the `#unknown` method.
+
+``` ruby
+logger = Logger.new STDOUT
+
+logger.any "Test."
+# A, [2000-01-10T09:00:00.847428 #44925] ANY -- : Test.
+
+logger.any { "Test." }
+A, [2000-01-10T09:00:00.330719 #44925] ANY -- : Test.
+```
+
==== Pathname
===== Pathname
Enhances the `Kernel` conversion function which casts `nil` into a pathname in order to avoid:
@@ -815,11 +829,11 @@
----
# Before
Dir[File.join(__dir__, "support/shared_contexts/**/*.rb")].sort.each { |path| require path }
# After
-Pathname.require_tree __dir__, "support/shared_contexts/**/*.rb"
+Pathname.require_tree "#{__dir__}/support/shared_contexts"
----
The following are further examples of potential usage:
[source,ruby]
@@ -829,11 +843,11 @@
# Requires all files in `/test/**/*.rb` and below.
Pathname.require_tree "/test"
# Requires all files in RSpec shared examples directory structure.
-Pathname.require_tree SPEC_ROOT, "support/shared_examples/**/*.rb"
+Pathname.require_tree SPEC_ROOT.join("support/shared_examples")
----
===== .root
Answers operating system root path.
@@ -1437,21 +1451,21 @@
[source,bash]
----
bin/rake
----
-== link:https://www.alchemists.io/policies/license[License]
+== link:https://alchemists.io/policies/license[License]
-== link:https://www.alchemists.io/policies/security[Security]
+== link:https://alchemists.io/policies/security[Security]
-== link:https://www.alchemists.io/policies/code_of_conduct[Code of Conduct]
+== link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]
-== link:https://www.alchemists.io/policies/contributions[Contributions]
+== link:https://alchemists.io/policies/contributions[Contributions]
-== link:https://www.alchemists.io/projects/refinements/versions[Versions]
+== link:https://alchemists.io/projects/refinements/versions[Versions]
-== link:https://www.alchemists.io/community[Community]
+== link:https://alchemists.io/community[Community]
== Credits
-* Built with link:https://www.alchemists.io/projects/gemsmith[Gemsmith].
-* Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
+* Built with link:https://alchemists.io/projects/gemsmith[Gemsmith].
+* Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].