conjugatefr 1.0.4 → 1.0.5
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
- metadata +40 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7325e1c8c2b866f22cc9bf5a2213cb6ffbff256e
|
4
|
+
data.tar.gz: 72fd5bc2053e9b7992c7b64bb9585a79d031137d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6730a1ecff74e72fc3c2528fa508165b749a581bd83eaf356e5c3be72732f8a182c0e5e1999c17f6e0434b9f5008161a1816582af5fd22afe271e94aad6f0168
|
7
|
+
data.tar.gz: 682feec8fec1b7896d06b5751b59896cd6cef801056227e7b1d11f724bca87cf324d9fa38062bc37736aa987503af46bf68911c97725ca35c69dc1bcdd0fc8f2
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conjugatefr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- htmlguy
|
@@ -10,51 +10,51 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2015-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: |
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
description: |
|
14
|
+
== ABOUT
|
15
|
+
A simple program and library to conjugate french verbs.
|
16
|
+
Parses responses to requests to an online reference site.
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
=== Executable
|
19
|
+
ConjugateFR comes with the executable binary +conjugatefr+.
|
20
|
+
To view information about it's supported arguments, run
|
21
|
+
conjugatefr --help
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
=== Custom Renderers
|
24
|
+
To make a custom renderer, just type
|
25
|
+
require conjugatefr/renderer
|
26
|
+
and then make a class that extends +Renderer+.
|
27
|
+
An example is as follows:
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
end
|
39
|
-
end
|
40
|
-
def post
|
41
|
-
puts "This goes after the words."
|
29
|
+
require 'conjugatefr/renderer'
|
30
|
+
class ExampleRenderer < Renderer
|
31
|
+
def pre
|
32
|
+
puts "This goes before the words."
|
33
|
+
end
|
34
|
+
def word (name, words)
|
35
|
+
print "#{name}:"
|
36
|
+
words.each do |word|
|
37
|
+
print " #{word}"
|
42
38
|
end
|
43
|
-
def description; "Renders an example format."; end
|
44
39
|
end
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
40
|
+
def post
|
41
|
+
puts "This goes after the words."
|
42
|
+
end
|
43
|
+
def description; "Renders an example format."; end
|
44
|
+
end
|
45
|
+
# Add to the Renderers list (For CLI and other programs that use it.)
|
46
|
+
$renderers["Example"] = ExampleRenderer.new
|
47
|
+
To try this out, save it as +erend.rb+ and then run:
|
48
|
+
conjugatefr -R ./erend.rb -r Example
|
49
|
+
It will produce the output:
|
50
|
+
This goes before the words.
|
51
|
+
someword: someconjugation etc etc
|
52
|
+
... (more words will be here)
|
53
|
+
This goes after the words.
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
=== The Library
|
56
|
+
The library can be included with +require conjugatefr+. It includes the
|
57
|
+
+ConjugateFR+ class.
|
58
58
|
email: htmlguy@pdum.xyz
|
59
59
|
executables:
|
60
60
|
- conjugatefr
|