line-tree 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69a9e3b50c682ca9e9621e6814e09d65c862c96d
4
- data.tar.gz: d2b88b70095d2926cee08f7649d0c9c74ed9fa88
3
+ metadata.gz: 3ab47e8b0765023b969fd19e51f1178d60a19ef9
4
+ data.tar.gz: 0fa61f25641757a0a32d1625864bcdfbcdd231c7
5
5
  SHA512:
6
- metadata.gz: 213e0e75ba1c9cb9ee43596445ae3317d55e35acb8382efb22743704dde4d0db78305a6db04bb9b81e1293a1cc6bc3c46b5c5ce8b4aa8a671966d3cedd497278
7
- data.tar.gz: '08d709198d5fb1fd539de8c27ea340ff51d6e817c454a9870fb5230e676276cf1194946d2c10af01f96d9b9a8b36ebfb088c17d50c20a8f0d24ae73c677dc63d'
6
+ metadata.gz: '084a40631968eb02b148f5eda847cbf9732c7d347ee5b28d7c0a0871848c988cc39fcd2d0060305004a27542968920d93b050adb8d8340394ea753aae4bfc18b'
7
+ data.tar.gz: 33621099f8cdfb3327f26734286c18ca3681e8cb11d2224431751a3212da3d99732d4d86589994abcef39dc1eedc3436d8b444db417a7addaab66549cf2312a7
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/line-tree.rb CHANGED
@@ -9,8 +9,11 @@ class LineTree
9
9
 
10
10
  attr_reader :to_a
11
11
 
12
- def initialize(s, level: nil, ignore_non_element: true,
13
- ignore_blank_lines: true, ignore_label: false, ignore_newline: true)
12
+ def initialize(raw_s, level: nil, ignore_non_element: true,
13
+ ignore_blank_lines: true, ignore_label: false,
14
+ ignore_newline: true, root: nil)
15
+
16
+ s = root ? root + "\n" + raw_s.lines.map {|x| ' ' + x}.join : raw_s
14
17
 
15
18
  @ignore_non_element = ignore_non_element
16
19
  @ignore_label = ignore_label
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: line-tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file