Skip to content

Commit

Permalink
Re-add @private, undocumented .identifier method that was only me… (
Browse files Browse the repository at this point in the history
#2109)

* Re-add `@private`, undocumented `.identifier` method that was only meant for internal framework use but was used by some downstream consumers. This method will be removed in a coming minor release.

* add nocov marks
  • Loading branch information
joelhawksley authored Sep 30, 2024
1 parent 0dc9342 commit 6fa2a91
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ nav_order: 5

## main

* Re-add `@private`, undocumented `.identifier` method that was only meant for internal framework use but was used by some downstream consumers. This method will be removed in a coming minor release.

*Joel Hawksley*

## 3.15.0

* Add basic internal testing for memory allocations.
Expand Down
9 changes: 9 additions & 0 deletions lib/view_component/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,15 @@ def compiler
@__vc_compiler ||= Compiler.new(self)
end

# @private
def identifier
# :nocov:
Kernel.warn("WARNING: The #{self.class}.identifier is undocumented and was meant for internal framework usage only. As it is no longer used by the framework it will be removed in a coming non-breaking ViewComponent release.")

source_location
# :nocov:
end

# Set the parameter name used when rendering elements of a collection ([documentation](/guide/collections)):
#
# ```ruby
Expand Down

0 comments on commit 6fa2a91

Please sign in to comment.