satori_like_dictionary 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/satori_like_dictionary.rb +13 -1
- data/satori_like_dictionary.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c59622c6f18ee113723cbc3ce1acd8ad633320f
|
4
|
+
data.tar.gz: 151782ce65a8e051598205c9d3b44b83703d97bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 417b6d91e05e9305d15e19b5f20079940f73e501f9dad0f4a52195b4446cb8d79f644d3153863f7a1e746b9ac3a2b8f058b09c7ef15923e76e17b38d6741bdc2
|
7
|
+
data.tar.gz: 8d5110d0816381dec2ead7cb1756762ef0b0f42ccf1f00ede1f7e04d843b9d5f322df0eed072db15aba71fa70c8dab4c881024753aa18960e90f096dc03b8b84
|
@@ -114,7 +114,7 @@ class SatoriLikeDictionary
|
|
114
114
|
# @return [String] result
|
115
115
|
def render_base(events, request)
|
116
116
|
value = render_template(events, request)
|
117
|
-
.gsub(
|
117
|
+
.gsub(/\b_(\S+)/, "\\q[\\1,\\1]")
|
118
118
|
.gsub(/(([^)]*))/) do
|
119
119
|
content = $1
|
120
120
|
if content.match(/^[0-90-9]+$/)
|
@@ -256,11 +256,13 @@ class SatoriLikeDictionary
|
|
256
256
|
end
|
257
257
|
|
258
258
|
# jump to entry
|
259
|
+
# @param [String] target_entry jump target entry name
|
259
260
|
def jump_to(target_entry)
|
260
261
|
"(#{target_entry})\\e"
|
261
262
|
end
|
262
263
|
|
263
264
|
# set communication target
|
265
|
+
# @param [String] target_character communication target character name
|
264
266
|
def call_to(target_character)
|
265
267
|
request.__satori_target_character = target_character
|
266
268
|
end
|
@@ -277,6 +279,9 @@ class SatoriLikeDictionary
|
|
277
279
|
|
278
280
|
private
|
279
281
|
|
282
|
+
# line[1...line.size]
|
283
|
+
# @param [String] line line
|
284
|
+
# @return [String] line
|
280
285
|
def linebody(line)
|
281
286
|
line[1...line.size]
|
282
287
|
end
|
@@ -290,6 +295,13 @@ class SatoriLikeDictionaryIntegratedEvents
|
|
290
295
|
@satori_like_dictionary = SatoriLikeDictionary.new(self)
|
291
296
|
end
|
292
297
|
|
298
|
+
# "_" compatible OnChoiceSelect
|
299
|
+
# @param [OpenStruct] request request hash
|
300
|
+
# @return [String|OpenStruct] result
|
301
|
+
def OnChoiceSelect(request)
|
302
|
+
public_send(request.Reference0, request)
|
303
|
+
end
|
304
|
+
|
293
305
|
private
|
294
306
|
|
295
307
|
# load all files in a directory as satori like dictionaries
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: satori_like_dictionary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Narazaka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|