ruby-pinyin 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ module PinYin
2
+ class Value < String
3
+ attr_accessor :english
4
+ alias :english? :english
5
+
6
+ def initialize(str, english=true)
7
+ super(str)
8
+ self.english = english
9
+ end
10
+
11
+ def split(*args)
12
+ result = super
13
+ result.map {|str| self.class.new(str, english)}
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,3 @@
1
+ module PinYin
2
+ VERSION = '0.1.0'
3
+ end
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-pinyin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jan Xie
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-06 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Pinyin is a romanization system (phonemic notation) of Chinese characters,
15
+ this gem helps you to convert Chinese characters into pinyin form.
16
+ email:
17
+ - jan.h.xie@gmail.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - lib/ruby-pinyin.rb
23
+ - lib/ruby-pinyin/version.rb
24
+ - lib/ruby-pinyin/value.rb
25
+ - lib/ruby-pinyin/Mandarin.dat
26
+ - MIT-LICENSE
27
+ - README.markdown
28
+ homepage: https://github.com/janx/ruby-pinyin
29
+ licenses: []
30
+ post_install_message:
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ none: false
36
+ requirements:
37
+ - - ! '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ required_rubygems_version: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubyforge_project:
48
+ rubygems_version: 1.8.24
49
+ signing_key:
50
+ specification_version: 3
51
+ summary: Convert Chinese characters into pinyin.
52
+ test_files: []
53
+ has_rdoc: