gemmyrb 0.1.3 → 0.1.4

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: b2d90fcdf579db68f27ca1757ff19a799fcfc922
4
- data.tar.gz: dec4516b981738b2494a9886227c22ebb1de168d
3
+ metadata.gz: fc0ffbc6ed6da480a3ef8656ca35a2b3a7602792
4
+ data.tar.gz: d8071c5e02542a3cec78294acaf9617c36d43ed6
5
5
  SHA512:
6
- metadata.gz: 2492d8942963c75d93fac869831113119249a3eb4718c4aaf495acddacb6655a7844072362c36a56043e556f488a38477bd3907f58012c03baee62dbb341703c
7
- data.tar.gz: 17f0dee57643eaa6f3ce8df6fdad7e271eb8a8232b358316bdfffb2b397ce03ffaed083549e769e8d0971dd2836d572946c4b09b53816e35a624df175af7f73b
6
+ metadata.gz: 4ceacf10a1709a0a3e1001c598d88988f11422579808cb287cec32a927989b46cdbe256d444f49995945ee7559877fa439639d0a01996aa261418c8c48c971d6
7
+ data.tar.gz: d28be996fa7273f51a6f18d72c1cafca24e2c091f3ab57557865cdaccd519e38cd23501474097045c88f4a7ce448f1c4c1d600345e85dc34b02254dcede20805
data/README.md CHANGED
@@ -5,16 +5,9 @@ and defines some system tasks, such as generating a gem.
5
5
 
6
6
  It is on RubyGems. Because there is an existing gem named `gemmy`, the name passed to `gem install` is `gemmyrb`. But `require 'gemmy'` is still used.
7
7
 
8
- RubyGems hosts the YARD documentation at [http://www.rubydoc.info/gems/gemmyrb](http://www.rubydoc.info/gems/gemmyrb), but it's only updated when I push
9
- a new gem version. So the version on Github's master branch might contain
10
- undocumented functionality. I'll try to keep the RubyGems version up-to-date though.
8
+ RubyGems hosts the YARD documentation at [http://www.rubydoc.info/gems/gemmyrb](http://www.rubydoc.info/gems/gemmyrb), but it's only updated when I remember to run `yard`.
11
9
 
12
- YARD is not the best for a birds-eye overview. For that, see the following
13
- documents:
14
-
15
- **Note! The following links won't work if you're reading this on rubydoc.info**
16
-
17
- **Follow the links from http://github.com/maxpleaner/gemmy instead**
10
+ **Follow the links from http://github.com/maxpleaner/gemmy, not rubydoc**
18
11
 
19
12
  - _Loading the gem's code in different scopes_
20
13
  - [examples/01_using_as_refinement.rb](./examples/01_using_as_refinement.rb)
@@ -29,4 +22,4 @@ documents:
29
22
 
30
23
  Specifically, look at the constants defined on Gemmy::Patches. There is one
31
24
  module for each of the core classes being patched. Each individual method
32
- is also contained in its own module (for the sake of, well, modularity).
25
+ is also contained in its own module.
@@ -2,8 +2,8 @@ module Gemmy::Components::WordSpeaker
2
2
 
3
3
  Gemmy.patches.each { |x| using x }
4
4
 
5
- def speak_sentence(*args)
6
- sentence = Gemmy.component("word_speaker/sentence").new(*args)
5
+ def speak_sentence(**args)
6
+ sentence = Gemmy.component("word_speaker/sentence").new(args)
7
7
  sentence.save_to_file.speak_file
8
8
  end
9
9
 
@@ -42,19 +42,6 @@ module Gemmy::Patches::ArrayPatch
42
42
  end
43
43
  end
44
44
 
45
-
46
- module MethodMissing
47
- # Tries to forward methods to enumerator
48
- def method_missing(fn, &blk)
49
- enum = to_enum
50
- if enum.respond_to?(fn)
51
- blk ? enum.send(fn, &blk) : enum.send(fn)
52
- else
53
- super
54
- end
55
- end
56
- end
57
-
58
45
  module RunCommands
59
46
  # Part of the Nlp API
60
47
  # Example:
@@ -3,6 +3,18 @@ module Gemmy::Patches::ProcPatch
3
3
  end
4
4
  module InstanceMethods
5
5
 
6
+ module Call
7
+ def call(*args, &blk)
8
+ this = self
9
+ if (opts=args.last).is_a?(Hash) && (proc=opts[:threaded_if])
10
+ if proc.is_a?(Proc) && proc.call
11
+ return Thread.new { self.call(*args, &blk) }
12
+ end
13
+ end
14
+ self.call(*args, &blk)
15
+ end
16
+ end
17
+
6
18
  module ToMethod
7
19
  # facets
8
20
  # converts a proc to a method on an object
@@ -1,3 +1,3 @@
1
1
  class Gemmy
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemmyrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - max pleaner