Skip to content

Commit

Permalink
Drop delegate dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki24 committed Dec 14, 2019
1 parent cba0675 commit 13f13c8
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 13f13c8

Please sign in to comment.