Skip to content

Commit

Permalink
Renames BlackHole to Vanish for consistency (#820)
Browse files Browse the repository at this point in the history
This commit tidies up the API by making the naming consistent with
#805
  • Loading branch information
bradgessler authored Nov 8, 2024
1 parent 86e565d commit f02859a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/phlex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module Phlex
autoload :ArgumentError, "phlex/errors/argument_error"
autoload :BlackHole, "phlex/black_hole"
autoload :Vanish, "phlex/vanish"
autoload :CSV, "phlex/csv"
autoload :Callable, "phlex/callable"
autoload :Context, "phlex/context"
Expand Down
4 changes: 2 additions & 2 deletions lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ def vanish(*args)
return unless block_given?

if args.length > 0
@_context.capturing_into(Phlex::BlackHole) { yield(*args) }
@_context.capturing_into(Phlex::Vanish) { yield(*args) }
else
@_context.capturing_into(Phlex::BlackHole) { yield(self) }
@_context.capturing_into(Phlex::Vanish) { yield(self) }
end

nil
Expand Down
2 changes: 1 addition & 1 deletion lib/phlex/black_hole.rb → lib/phlex/vanish.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# @api private
module Phlex::BlackHole
module Phlex::Vanish
extend self

def <<(anything)
Expand Down

0 comments on commit f02859a

Please sign in to comment.