line-tree 0.4.6 → 0.4.7

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: 03045984648cbf4746e6ca3e5d1fd3d878e32b96
4
- data.tar.gz: 41c467e61929553a4d542ab584eae95786fd8678
3
+ metadata.gz: f83204981f5eb869747559800e7283417ae9a98c
4
+ data.tar.gz: 30a968cadfe3cdc596447118cdddb76ca4ea94d5
5
5
  SHA512:
6
- metadata.gz: 4bcbb2122e139c764a0e9a8381fedf4e8755ec31af0bffcaa787912a84c46113077412fa618849001d2ff699e1d241e29eb9edf2f739f12c92371679b167718b
7
- data.tar.gz: ea052aa7927fa46c806bb5d5db95360b6b9318b4e944fdabbdd43f8923b4e1c297e4613a87a422693a507135f60fa28afd5c6bedb40a2f87ef0e9e9c57329523
6
+ metadata.gz: 7f217d97c9a636f4e7e950bd1f569d6a889482f74d2760f4c4c89871976b6e65247994be39522e80ca8848fda9cea23909e84dfeaa1248e5761502873ba22638
7
+ data.tar.gz: fb631f5115bab54c0c8e24dec0cb3ad511f02fc87d832d6160a9e3bad27ec1b08ee7b1c4ef78129fb545cd1a21ec666a2212e431fb096569002f4e67518a1e98
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/line-tree.rb CHANGED
@@ -9,10 +9,11 @@ class LineTree
9
9
  attr_reader :to_a
10
10
 
11
11
  def initialize(lines, level: nil, ignore_non_element: true,
12
- ignore_blank_lines: true)
12
+ ignore_blank_lines: true, ignore_label: false)
13
13
 
14
14
  @ignore_non_element = ignore_non_element
15
15
  @ignore_blank_lines = ignore_blank_lines
16
+ @ignore_label = ignore_label
16
17
  @to_a = scan_shift(lines.strip, level)
17
18
  end
18
19
 
@@ -30,8 +31,8 @@ class LineTree
30
31
  a = lines.split(/(?=^\S+)/)
31
32
 
32
33
  a.map do |x|
33
-
34
- unless x[/.*/][/^\s*\w+:\S+/] then
34
+
35
+ if @ignore_label == true or not x[/.*/][/^\s*\w+:\S+/] then
35
36
 
36
37
  rlines = @ignore_blank_lines ? (x).split(/\n/) : (x).split(/\n/,-1)
37
38
 
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- ��i�c!2t��`v<�ZW>KH,#�]�-�5��陋���͈b�ۤ�S��qǾ7��t��a������/6��3�gzt%�m;��A1��M~>�-"���
2
- '͐�V;^Sϕ�-�ͺ���]s0Xxx���,�)��EO��7n lr����2�[��N\�>b�c�'��;��'pGg�Y�ߝ�T" ��4X��+#3��������&4@4#7g1����zKX;��zBTMM^�v(�̓�N�-�96Bd��K�O
1
+ G`R����b�eX�ٞ`Zƶ���[(橉���p %W�3� �XIm���1eba�äN
2
+ l o�4i�v�w�,�\ ks���a��!������μј�t�~�6���J��U<�^�Z��F@ ���G�V�IBO��'L�\��&8�﬌���eD�$x�>e�Xǡ-�ʼ[�v�^U�����b^��w|������j��b�X<?�J��}F�� ���a��1�R tom�����q"���u
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.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  ErtlSTAImlBCK8q5BS4jBBt8VAEpNdkWpWbtDtLPA639pW2QWIcPx13ObWJh7Ejk
32
32
  THoVqqsHTfeg3g==
33
33
  -----END CERTIFICATE-----
34
- date: 2014-12-30 00:00:00.000000000 Z
34
+ date: 2015-01-21 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rexle
metadata.gz.sig CHANGED
Binary file