1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Drop delegate dependency

Original comment:
  2f26c9ee77
This commit is contained in:
Yuki Nishijima 2019-12-13 21:39:58 -05:00
parent f3240eb67d
commit e2708068ad

View file

@ -1,6 +1,5 @@
# frozen-string-literal: true # frozen-string-literal: true
require 'delegate'
require_relative "../../spell_checker" require_relative "../../spell_checker"
module DidYouMean module DidYouMean
@ -32,16 +31,16 @@ module DidYouMean
end.uniq end.uniq
end end
class ClassName < SimpleDelegator class ClassName < String
attr :namespace attr :namespace
def initialize(name, namespace = '') def initialize(name, namespace = '')
super(name) super(name.to_s)
@namespace = namespace @namespace = namespace
end end
def full_name def full_name
self.class.new("#{namespace}#{__getobj__}") self.class.new("#{namespace}#{self}")
end end
end end