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
require 'delegate'
require_relative "../../spell_checker"
module DidYouMean
@ -32,16 +31,16 @@ module DidYouMean
end.uniq
end
class ClassName < SimpleDelegator
class ClassName < String
attr :namespace
def initialize(name, namespace = '')
super(name)
super(name.to_s)
@namespace = namespace
end
def full_name
self.class.new("#{namespace}#{__getobj__}")
self.class.new("#{namespace}#{self}")
end
end