projects
/
erd-marker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Added simplecov
[erd-marker.git]
/
lib
/
erd_handler
/
box.rb
diff --git
a/lib/erd_handler/box.rb
b/lib/erd_handler/box.rb
index 75543eb22674b1dcc92f5734dcc6ea6366a929e3..244b411fc597e663ba4b637685dcf5ddf1f177cc 100644
(file)
--- a/
lib/erd_handler/box.rb
+++ b/
lib/erd_handler/box.rb
@@
-28,5
+28,9
@@
module ErdHandler
other.contains?(self)
end
+ def similarity(other)
+ 1.0 - self.name.edit_distance(other.name) / self.name.length.to_f
+ end
+
end
end