Skip to content

Commit

Permalink
Merge pull request #138 from ruby/delegate
Browse files Browse the repository at this point in the history
Drop delegate dependency
  • Loading branch information
yuki24 committed Dec 14, 2019
2 parents 36fbdfc + 2f26c9e commit 810501e
Showing 1 changed file with 3 additions and 4 deletions.
@@ -1,6 +1,5 @@
# frozen-string-literal: true

require 'delegate'
require_relative "../../spell_checker"

module DidYouMean
Expand Down Expand Up @@ -32,16 +31,16 @@ def scopes
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

Expand Down

0 comments on commit 810501e

Please sign in to comment.