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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ff264a3d70e5ea90f99df8d6bc127ef8779fdc8
4
- data.tar.gz: 95c82a2e4f2942612202ba5dd856e2e1e3c48ebc
3
+ metadata.gz: 8c59622c6f18ee113723cbc3ce1acd8ad633320f
4
+ data.tar.gz: 151782ce65a8e051598205c9d3b44b83703d97bb
5
5
  SHA512:
6
- metadata.gz: c61473990fce6eaa16a07e89a9743fb87fbc37503a6b81d507077a9959c626e7a3d81b266125c481499b4c1ea8c4f89435d9d02f056ad7347f2b20c93ad1a024
7
- data.tar.gz: 0160015705a0962e3509a4fe57631b2d470dcb5810eff5522520e55fb158d65bb353241d202126db6091b0aa2ea93fad4929efa0dacae1405bd435dc4cb7dace
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(/_(\S+)/, "\\q[\\1]")
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
@@ -3,7 +3,7 @@ lib = File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "satori_like_dictionary"
6
- spec.version = "0.0.1"
6
+ spec.version = "0.0.2"
7
7
  spec.authors = ["Narazaka"]
8
8
  spec.email = ["info@narazaka.net"]
9
9
 
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.1
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-13 00:00:00.000000000 Z
11
+ date: 2016-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler