inkjet 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inkjet/indent.rb +6 -6
- data/lib/inkjet/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 233f3dfad49a1beb08760b9103772c2cc037e3f2
|
4
|
+
data.tar.gz: a317f8e4542d17291bd2d55087a0151bbcd93291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26d2474dd3e67c76bab42f16da93c2edb0b6cf6a57cee53700f54ed3f7939bc6dfd1604270e2b64574b0edb5be2a6bf9e216e93921bc623686ba61b4a6379c52
|
7
|
+
data.tar.gz: 0df47b052ec940a56960779b9a397519ce12066480111f603a40b5d4cac0a7714a422d3a98a714771187e0319793b18985db8c1331255e7caec42e91ead989a7
|
data/lib/inkjet/indent.rb
CHANGED
@@ -16,12 +16,12 @@ module Inkjet
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.add_bindings(block)
|
19
|
-
block.binding.eval("
|
20
|
-
block.binding.eval("
|
21
|
-
block.binding.eval("
|
19
|
+
block.binding.eval("def puts(output); Inkjet::Indent.puts(output); end")
|
20
|
+
block.binding.eval("def print(output); Inkjet::Indent.print(output); end")
|
21
|
+
block.binding.eval("def format_with(meth, *args); Inkjet::Indent.format_with(meth, *args); end")
|
22
22
|
block
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
def self.indent(*args, &block)
|
26
26
|
@@spaces ||= 0
|
27
27
|
if block_given?
|
@@ -56,11 +56,11 @@ module Inkjet
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def self.puts(output)
|
59
|
-
STDOUT.puts apply_formatters(indent(output
|
59
|
+
STDOUT.puts apply_formatters(indent(output, 0))
|
60
60
|
end
|
61
61
|
|
62
62
|
def self.print(output)
|
63
|
-
STDOUT.print apply_formatters(indent(output
|
63
|
+
STDOUT.print apply_formatters(indent(output, 0))
|
64
64
|
end
|
65
65
|
|
66
66
|
module String
|
data/lib/inkjet/version.rb
CHANGED