lib/relevance/tarantula/transform.rb in tarantula-0.3.3 vs lib/relevance/tarantula/transform.rb in tarantula-0.4.0
- old
+ new
@@ -1,17 +1,21 @@
-class Relevance::Tarantula::Transform
- attr_accessor :from, :to
- def initialize(from, to)
- @from = from
- @to = to
- end
- def [](string)
- case to
- when Proc
- string.gsub(from, &to)
- else
- string.gsub(from, to)
+module Relevance
+ module Tarantula
+
+ class Transform
+ attr_accessor :from, :to
+ def initialize(from, to)
+ @from = from
+ @to = to
+ end
+ def [](string)
+ case to
+ when Proc
+ string.gsub(from, &to)
+ else
+ string.gsub(from, to)
+ end
+ end
end
+
end
end
-
-