js_regex 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/js_regex.rb +6 -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: 6cb3d7055fec1f15ccd2de436ec8f2e54be92f44
|
4
|
+
data.tar.gz: 43eb2c6310a49e014f88c09ddf038c4f1e8e0203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e33845123254edea36788006898ade901b7d61b0f344658fb2f3fdb849a4e7865561b3e942b9773a393ede8a4a3ce047e13c1924662cb643f56cd6f9cc4a83c
|
7
|
+
data.tar.gz: 537f23e4ee912e8efb4fb0868409c2c0328be89cd7f4d05d003e583d47b8e9c908e7fb07a81be3cd21a0c8ad3c79ca2e56c17960359e0e04e71fe4deda9dfe26
|
data/lib/js_regex.rb
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
#
|
10
10
|
class JsRegex
|
11
11
|
require_relative File.join('js_regex', 'conversion')
|
12
|
+
require 'json'
|
12
13
|
|
13
14
|
attr_reader :source, :options, :warnings
|
14
15
|
|
@@ -17,7 +18,11 @@ class JsRegex
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def to_h
|
20
|
-
{ source: source
|
21
|
+
{ source: source, options: options }
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_json(options = {})
|
25
|
+
to_h.to_json(options)
|
21
26
|
end
|
22
27
|
|
23
28
|
def to_s
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: js_regex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janosch Müller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: regexp_parser
|