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 36fbdfc commit 2f26c9e
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 2f26c9e

Please sign in to comment.