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 +4 -4
- data/README.md +3 -10
- data/lib/gemmy/components/word_speaker.rb +2 -2
- data/lib/gemmy/patches/array_patch.rb +0 -13
- data/lib/gemmy/patches/proc_patch.rb +12 -0
- data/lib/gemmy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc0ffbc6ed6da480a3ef8656ca35a2b3a7602792
|
4
|
+
data.tar.gz: d8071c5e02542a3cec78294acaf9617c36d43ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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
|
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(
|
6
|
-
sentence = Gemmy.component("word_speaker/sentence").new(
|
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
|
data/lib/gemmy/version.rb
CHANGED