Hide #inspect in docs.

This commit is contained in:
Markus Reiter 2024-04-26 13:20:05 +02:00
parent f5cde8ad0d
commit fe4ef62aa9
No known key found for this signature in database
GPG Key ID: 245293B51702655B
14 changed files with 24 additions and 2 deletions

View File

@ -330,6 +330,8 @@ module Cask
# @api internal
def to_s = token
# @!visibility private
sig { returns(String) }
def inspect
"#<Cask #{token}#{sourcefile_path&.to_s&.prepend(" ")}>"
end

View File

@ -68,6 +68,8 @@ class CompilerFailure
type == compiler.type && version_matched
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{type} #{version}>"
end

View File

@ -22,6 +22,7 @@ class CxxStdlib
type.to_s.gsub(/cxx$/, "c++")
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{compiler} #{type}>"

View File

@ -37,6 +37,7 @@ class Dependencies < SimpleDelegator
self.class.new(*__getobj__.reject { |dep| dep.uses_from_macos? && dep.use_macos_install? })
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{__getobj__}>"
@ -65,6 +66,7 @@ class Requirements < SimpleDelegator
self
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: {#{__getobj__.to_a.join(", ")}}>"

View File

@ -96,6 +96,7 @@ class Dependency
false
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{name.inspect} #{tags.inspect}>"
@ -279,6 +280,7 @@ class UsesFromMacOSDependency < Dependency
self.class.new(formula.full_name.to_s, tags, bounds:)
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{name.inspect} #{tags.inspect} #{bounds.inspect}>"

View File

@ -1735,7 +1735,7 @@ class Formula
name
end
# @private
# @!visibility private
sig { returns(String) }
def inspect
"#<Formula #{name} (#{active_spec_sym}) #{path}>"

View File

@ -177,6 +177,7 @@ class Keg
alias to_path to_s
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}:#{path}>"

View File

@ -32,6 +32,7 @@ class Option
name.hash
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{flag.inspect}>"
@ -144,6 +145,7 @@ class Options
@options.map(&:to_s).join(" ")
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{to_a.inspect}>"

View File

@ -55,6 +55,7 @@ class EmbeddedPatch
Utils.safe_popen_write("patch", *args) { |p| p.write(data) }
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{strip.inspect}>"
@ -160,6 +161,7 @@ class ExternalPatch
raise BuildError.new(f, cmd, args, ENV.to_hash)
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{strip.inspect} #{url.inspect}>"

View File

@ -142,6 +142,7 @@ class Requirement
[self.class, name, tags].hash
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: #{tags.inspect}>"

View File

@ -29,6 +29,8 @@ class ArchRequirement < Requirement
"The #{@arch} architecture is required for this software."
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: arch=#{@arch.to_s.inspect} #{tags.inspect}>"
end

View File

@ -98,6 +98,7 @@ class MacOSRequirement < Requirement
[super, comparator, version].hash
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: version#{@comparator}#{@version.to_s.inspect} #{tags.inspect}>"

View File

@ -50,6 +50,7 @@ class XcodeRequirement < Requirement
end
end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}: version>=#{@version.inspect} #{tags.inspect}>"

View File

@ -59,6 +59,7 @@ class Version
sig { abstract.params(other: T.untyped).returns(T.nilable(Integer)) }
def <=>(other); end
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name} #{value.inspect}>"
@ -133,7 +134,8 @@ class Version
sig { returns(T::Boolean) }
def blank? = true
sig { override.returns(String) }
# @!visibility private
sig { returns(String) }
def inspect
"#<#{self.class.name}>"
end
@ -726,6 +728,7 @@ class Version
super
end
# @!visibility private
sig { returns(String) }
def inspect
return "#<Version::NULL>" if null?