lib/tapioca/helpers/source_uri.rb in tapioca-0.16.4 vs lib/tapioca/helpers/source_uri.rb in tapioca-0.16.5

- old
+ new

@@ -23,13 +23,10 @@ # On earlier versions of the uri gem, the RFC2396_PARSER constant doesn't exist, so it needs some special # handling to select a parser that doesn't emit deprecations. While it was backported to Ruby 3.1, users may # have the uri gem in their own bundle and thus not use a compatible version. PARSER = T.let(const_defined?(:RFC2396_PARSER) ? RFC2396_PARSER : DEFAULT_PARSER, RFC2396_Parser) - alias_method(:gem_name, :host) - alias_method(:line_number, :fragment) - sig { returns(T.nilable(String)) } attr_reader :gem_version class << self extend T::Sig @@ -50,9 +47,19 @@ path: PARSER.escape("/#{gem_version}/#{path}"), fragment: line_number, } ) end + end + + sig { returns(T.nilable(String)) } + def gem_name + host + end + + sig { returns(T.nilable(String)) } + def line_number + fragment end sig { params(v: T.nilable(String)).void } def set_path(v) # rubocop:disable Naming/AccessorMethodName return if v.nil?