px_todo 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a7641512d15318225a9d56113b259e9cc26c227
4
- data.tar.gz: 8c0061150d8c3078fbe4659d1db8bd6f9ba6124c
3
+ metadata.gz: b1110b48d6feb030373b1b1554d225c61adca043
4
+ data.tar.gz: 68afd27b8dc9eb969fa5969ed66cbd54da380b9e
5
5
  SHA512:
6
- metadata.gz: af08dc210cf3e959efa8eda070958edf2ded618baf242b89cc7dfb0611bc3187a811381bf48e2d80538fe9519936296b7d2d87819da1c00948f5278f0b7c7c0a
7
- data.tar.gz: ea0d30177ea64057538948908a91cf58cbe85a238988fac37df6acc2f188eb54da326fd00addc8ca61dd7974b800ad86367870b912277e26a757865843657e54
6
+ metadata.gz: 35e4a5ef8a080133c767f60fb42131912c19bbdd71b6c376af6e4ac53eaf9da5aea0d0f07b30bb1dfd81ad8d2fa767a14bd03df78c840bee3211d790a3e49593
7
+ data.tar.gz: 58f714246d556c663d82da6eaf14f91c79efc3b68ffe8b9db44d6bd40b40686b9ff42d23496c2b889ea00f12343161877665c98f0b73e0dcedeaba4017721b19
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/px_todo.rb CHANGED
@@ -11,11 +11,25 @@ class PxTodo
11
11
 
12
12
  def initialize(raw_s, filepath: '.')
13
13
 
14
+ Dir.chdir filepath
14
15
  s, type = RXFHelper.read(raw_s)
15
16
 
16
17
  @filepath = filepath
17
18
  @filepath = File.dirname(raw_s) if type == :file and filepath == '.'
19
+
20
+ s =~ /<?xml/ ? load_px(s) : import_txt(s)
18
21
 
22
+ end
23
+
24
+
25
+ def to_px
26
+ @px
27
+ end
28
+
29
+ private
30
+
31
+ def import_txt()
32
+
19
33
  # remove the file heading
20
34
  lines = s.lines
21
35
  lines.shift 3
@@ -68,14 +82,11 @@ class PxTodo
68
82
 
69
83
  end
70
84
 
71
- end
72
-
85
+ end
86
+
73
87
  end
74
88
 
75
-
76
- def to_px
77
- @px
89
+ def load_px(s)
90
+ @px = Polyrex.new s
78
91
  end
79
-
80
-
81
92
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: px_todo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file