lib/facet/string/dequote.rb in facets-0.9.0 vs lib/facet/string/dequote.rb in facets-1.0.0
- old
+ new
@@ -1,28 +1,56 @@
-require 'nano/string/dequote.rb'
\ No newline at end of file
+class String
+
+ def dequote
+ s = self.dup
+
+ case self[0,1]
+ when "'", '"', '`'
+ s[0] = ''
+ end
+
+ case self[-1,1]
+ when "'", '"', '`'
+ s[-1] = ''
+ end
+
+ s
+ end
+
+end
+
+
+# _____ _
+# |_ _|__ ___| |_
+# | |/ _ \/ __| __|
+# | | __/\__ \ |_
+# |_|\___||___/\__|
+#
+# TODO
+