mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
f3240eb67d
commit
e2708068ad
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue