mindwords 0.5.2 → 0.5.3

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
  SHA256:
3
- metadata.gz: 9674ba7b1779b50888b7e917d46b77baf61fdf06de749e0f74ca924f7be3bd09
4
- data.tar.gz: 8e4ecfbf1a91e80515c5095bd9e998a28fbf7d556350ff8e241a4782e17a3652
3
+ metadata.gz: c0d833b4c7bb6f1226f6c6d5a8489fed1ba6c8d5a2410bbb6df2b61a9285bc4d
4
+ data.tar.gz: 0cc6c2b9ac7cb8e829b52ba224d04579ad0fb20eb15b8bcf8c39c2ba365c6a3c
5
5
  SHA512:
6
- metadata.gz: 94e2e23bce6a84e5fb5679581271451a6a393cd69655f22f0760cdcecd73f6d93e334d0bb5b3e582090cb970c1b406677da808cc47a6bfa6215bffa6607ba6fc
7
- data.tar.gz: 2cee5838d869dc197d63f5db05db62604b72f540c108bdacaf41b07ff2aabd4f96531277ce3694ddfaa926cf3bb881d05b424d89840e9ec955b802e30b3992be
6
+ metadata.gz: 6f2608e84d67e2303cc61a349a50147028b54f6f537aefb92bd0a6bf15dade2d5e418b84f3a9a543d545d0235fb65d171fd106ad24e9b6ca7239ecef131a961e
7
+ data.tar.gz: bd98ce9223b9343b1c827946f972f5ac1420c79484bf11e26e60f8fead39f42a4323682ed684fcee5e0cefa1239ffd9c387623fff31e99567d3ec7319ecd7e34
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -20,13 +20,15 @@ class MindWords
20
20
  using ColouredText
21
21
  using HashCopy
22
22
 
23
- attr_accessor :lines
23
+ attr_accessor :lines, :filepath
24
24
 
25
25
  def initialize(raws='', parent: nil, debug: false)
26
26
 
27
27
  @parent, @debug = parent, debug
28
28
 
29
- s, _ = RXFHelper.read raws
29
+ s, type = RXFHelper.read raws
30
+
31
+ @filepath = raws if type == :file or type == :dfs
30
32
  @lines = s.strip.gsub(/^\n/,'').lines
31
33
  @lines.shift if @lines.first =~ /<\?mindwords\?>/
32
34
 
@@ -49,6 +51,12 @@ class MindWords
49
51
  @parent.attributes[:hashtags].split if @parent
50
52
  end
51
53
 
54
+ def save(file=@filepath)
55
+
56
+ puts 'before save' if @debug
57
+ File.write file, to_s()
58
+
59
+ end
52
60
 
53
61
  def search(keyword)
54
62
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mindwords
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  aWH7D2AmhOpqNwWnPHzWR/yzpigAVTrvpHfRxZleQj6Z/090nIH2KR0RdioMmPFq
36
36
  3+574KQzs/gR9Y5a+iMcvHRN
37
37
  -----END CERTIFICATE-----
38
- date: 2021-01-25 00:00:00.000000000 Z
38
+ date: 2021-01-28 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: line-tree
metadata.gz.sig CHANGED
Binary file