emoruby 0.1.2 â 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -2
- data/config/translations.yml +7 -1
- data/lib/emoruby/version.rb +1 -1
- data/spec/3_stabby_proc_spec.rb +1 -1
- data/spec/6_blocks_spec.rb +9 -0
- data/spec/fixtures/6_blocks.emoruby +1 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 441a8c136e30e880454464f5e1c0ba5634064ded
|
4
|
+
data.tar.gz: 14d02d2690d2c67af6e4215bce422c5c812f0ee2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b87172bc8c3133db7b226e65fd776706fe1162cce393deae684b5757a2536505d430857d35c2a3863eb24e59c2846147c741616bf5726bce4958312362319a07
|
7
|
+
data.tar.gz: c15ea4c31286a01b7f8a3391fa7a329c4a1f60dbc1faece7ab5697618f427983ae56629ccd3177c90e310f3150300ab4c72736278530d7f22e938e2a0a3875e3
|
data/README.md
CHANGED
@@ -8,6 +8,8 @@ A little language that compiles Emoji down to Ruby. It's just Ruby. Really.
|
|
8
8
|
|
9
9
|
If I were a real language designer, I would have put a lot of thought into the syntax, semantics, and structure of emoruby. Instead I basically implemented an inefficient find-and-replace from a static dictionary. (đđŠ!)
|
10
10
|
|
11
|
+
### hello world
|
12
|
+
|
11
13
|
Anyway, here is an example hello world program:
|
12
14
|
|
13
15
|
```emoruby
|
@@ -32,6 +34,8 @@ end
|
|
32
34
|
Heart.new.wave
|
33
35
|
```
|
34
36
|
|
37
|
+
### procs and comments
|
38
|
+
|
35
39
|
You can also define things like Procs and comments:
|
36
40
|
|
37
41
|
```emoruby
|
@@ -50,6 +54,22 @@ which is equivalent to this Ruby:
|
|
50
54
|
end.call
|
51
55
|
```
|
52
56
|
|
57
|
+
### enumerables and block params
|
58
|
+
|
59
|
+
You can also define Array and Hash literals, and use the `{}` block syntax:
|
60
|
+
|
61
|
+
```emoruby
|
62
|
+
âī¸9ī¸âŖâ°3ī¸âŖâļī¸âĒī¸đ âĒ đđ
°đ đ
° â 1 âŠ
|
63
|
+
```
|
64
|
+
|
65
|
+
Which translates to this Ruby:
|
66
|
+
|
67
|
+
```
|
68
|
+
[9,3].map { |a| a + 1 }
|
69
|
+
```
|
70
|
+
|
71
|
+
### method visibility
|
72
|
+
|
53
73
|
You can define private and protected methods:
|
54
74
|
|
55
75
|
```emoruby
|
@@ -136,6 +156,6 @@ Emoruby.emoji_to_ruby(source)
|
|
136
156
|
|
137
157
|
## Versioning
|
138
158
|
|
139
|
-
The Emoruby team embraces and advocates the adoption of the the emerging
|
159
|
+
The Emoruby team embraces and advocates the adoption of the the emerging emotional versioning standard ("emover" for short).
|
140
160
|
|
141
|
-
The initial release was đŠ (in honor of @tenderlove's đŠ-lang). After that, â was released.
|
161
|
+
The initial release was đŠ (in honor of @tenderlove's đŠ-lang). After that, â was released. Then came đˇ. The next planned release is đ.
|
data/config/translations.yml
CHANGED
@@ -18,8 +18,13 @@
|
|
18
18
|
âĒī¸: "."
|
19
19
|
âĒī¸: "("
|
20
20
|
âŠī¸: ")"
|
21
|
+
âī¸: "["
|
22
|
+
âļī¸: "]"
|
23
|
+
âĒ: "{"
|
24
|
+
âŠ: "}"
|
25
|
+
đ: "|"
|
21
26
|
â°: ","
|
22
|
-
đ:
|
27
|
+
đ: "#"
|
23
28
|
|
24
29
|
# literals
|
25
30
|
1ī¸âŖ: "1"
|
@@ -41,6 +46,7 @@
|
|
41
46
|
đ°: tap
|
42
47
|
đ: call
|
43
48
|
â ī¸: warn
|
49
|
+
đ: map
|
44
50
|
â: "+"
|
45
51
|
â: "-"
|
46
52
|
â: "/"
|
data/lib/emoruby/version.rb
CHANGED
data/spec/3_stabby_proc_spec.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
âī¸9ī¸âŖâ°3ī¸âŖâļī¸âĒī¸đ âĒ đđ
°đ đ
° â 1 âŠ
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emoruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- spec/2_module_with_addition_spec.rb
|
151
151
|
- spec/3_stabby_proc_spec.rb
|
152
152
|
- spec/5_comments_spec.rb
|
153
|
+
- spec/6_blocks_spec.rb
|
153
154
|
- spec/fixtures/1_hello_world.emoruby
|
154
155
|
- spec/fixtures/1_hello_world.rb
|
155
156
|
- spec/fixtures/2_module_with_addition.emoruby
|
@@ -159,6 +160,7 @@ files:
|
|
159
160
|
- spec/fixtures/4_method_access.rb
|
160
161
|
- spec/fixtures/5_comments.emoruby
|
161
162
|
- spec/fixtures/5_comments.rb
|
163
|
+
- spec/fixtures/6_blocks.emoruby
|
162
164
|
- spec/spec_helper.rb
|
163
165
|
- spec/support/file_helpers.rb
|
164
166
|
homepage: https://github.com/searls/emoruby
|
@@ -190,6 +192,7 @@ test_files:
|
|
190
192
|
- spec/2_module_with_addition_spec.rb
|
191
193
|
- spec/3_stabby_proc_spec.rb
|
192
194
|
- spec/5_comments_spec.rb
|
195
|
+
- spec/6_blocks_spec.rb
|
193
196
|
- spec/fixtures/1_hello_world.emoruby
|
194
197
|
- spec/fixtures/1_hello_world.rb
|
195
198
|
- spec/fixtures/2_module_with_addition.emoruby
|
@@ -199,5 +202,6 @@ test_files:
|
|
199
202
|
- spec/fixtures/4_method_access.rb
|
200
203
|
- spec/fixtures/5_comments.emoruby
|
201
204
|
- spec/fixtures/5_comments.rb
|
205
|
+
- spec/fixtures/6_blocks.emoruby
|
202
206
|
- spec/spec_helper.rb
|
203
207
|
- spec/support/file_helpers.rb
|