data_formatter 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/data_formatter/array_collection.rb +1 -1
- data/lib/data_formatter/value.rb +3 -3
- data/lib/data_formatter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 290247bac33b4717b193dbc226364f79def3a093
|
4
|
+
data.tar.gz: cd7001a31c087fb5d74af42a34f65eabbdbb4808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2df565d9eb39cbfea9917c6661780160fa595053725a58707e5945459e75d99626ffce21b931157c5f0f06860d4d0c50f2ddeab357317b9167d41170c53af47
|
7
|
+
data.tar.gz: ce0338d6a19a209b54455468ff8adf7b4cdf9c80134cc57fec19c054bfbc019804404cd40f7bf7606d25fed92a71bd2d1e54b73d038b25dc685a4d9c77bc3092
|
data/lib/data_formatter/value.rb
CHANGED
@@ -14,7 +14,7 @@ module DataFormatter
|
|
14
14
|
format_number
|
15
15
|
elsif is?(String)
|
16
16
|
format_string
|
17
|
-
elsif is?(Symbol)
|
17
|
+
elsif is?(Symbol)
|
18
18
|
format_symbol
|
19
19
|
elsif is?(TrueClass, FalseClass)
|
20
20
|
format_boolean
|
@@ -44,7 +44,7 @@ module DataFormatter
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def format_string
|
47
|
-
escaped_value = { "\a" => '\a', "\b" => '\b', "\r" => '\r', "\n" => '\n', "\t" => '\t' }.inject(value) do |memo, pair|
|
47
|
+
escaped_value = { "\a" => '\a', "\b" => '\b', "\r" => '\r', "\n" => '\n', "\t" => '\t' }.inject(value) do |memo, pair|
|
48
48
|
memo.gsub(pair[0], pair[1])
|
49
49
|
end
|
50
50
|
mark_up(data: escaped_value, surround: '"', kind: "string" )
|
@@ -63,7 +63,7 @@ module DataFormatter
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def format_array
|
66
|
-
ArrayCollection.new(data: value, indentation: indentation)
|
66
|
+
ArrayCollection.new(data: value, indentation: indentation, lang: lang)
|
67
67
|
end
|
68
68
|
|
69
69
|
def mark_up(args)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Starr Horne
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
version: '0'
|
154
154
|
requirements: []
|
155
155
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.2.
|
156
|
+
rubygems_version: 2.2.2
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Format data for display
|