Skip to content
Permalink
Browse files

interpol8 ns => alandipert.interpol8; bump to 0.0.3

  • Loading branch information
alandipert committed Apr 14, 2013
1 parent f91628c commit e68785735ed15f9c38f5feb82536bd63c333a53a
Showing with 8 additions and 8 deletions.
  1. +2 −2 README.md
  2. +1 −1 project.clj
  3. +2 −2 src/{ → alandipert}/interpol8.clj
  4. +3 −3 test/{ → alandipert}/interpol8/test.clj
@@ -10,14 +10,14 @@ interpolation.
Add this to your `project.clj` if you're using [Leiningen](https://github.com/technomancy/leiningen/):

```clojure
[alandipert/interpol8 "0.0.2"]
[alandipert/interpol8 "0.0.3"]
```

Then, in the namespace you want string interpolation in:

```clojure
(ns your-ns
(:use [interpol8 :only (interpolating)]))
(:use [alandipert.interpol8 :only (interpolating)]))
(interpolating
(def foo 10)
@@ -1,3 +1,3 @@
(defproject alandipert/interpol8 "0.0.2"
(defproject alandipert/interpol8 "0.0.3"
:description "Ruby-style string interpolation"
:dependencies [[org.clojure/clojure "1.5.1"]])
@@ -1,4 +1,4 @@
(ns interpol8
(ns alandipert.interpol8
"Ruby-style string interpolation"
(:use [clojure.walk :only (postwalk)])
(:require [clojure.string :as string]))
@@ -30,4 +30,4 @@ string:
(let [y 20]
\"x is #{x} and y is #{y}\"))"
[& body]
`(do ~@(postwalk #(if (string? %) `(i ~%) %) body)))
`(do ~@(postwalk #(if (string? %) `(i ~%) %) body)))
@@ -1,6 +1,6 @@
(ns interpol8.test
(ns alandipert.interpol8.test
(:use clojure.test
interpol8))
alandipert.interpol8))

(deftest lexical-interpolation
(testing "that let bindings interpolate correctly")
@@ -18,4 +18,4 @@
(def z 100)
(let [x 10
y 20]
(is (= "1001020" "#{z}#{x}#{y}")))))
(is (= "1001020" "#{z}#{x}#{y}")))))

0 comments on commit e687857

Please sign in to comment.
You can’t perform that action at this time.