README.rdoc in hz2py-0.0.4 vs README.rdoc in hz2py-1.0.0
- old
+ new
@@ -11,30 +11,37 @@
== In rails
As GEM
rails3: gem 'hz2py'
+
rails2: config.gem 'hz2py'
As PLUGIN
rails3: rails plugin install git://github.com/elvuel/hz2py.git
+
rails2: ./script/plugin install git://github.com/elvuel/hz2py.git
== Usage & Example
# in rails app add config/initializers/hz2py.rb
- class String
+
+ String.class_eval do
def to_pinyin
Hz2py.do(self)
end
end
Hz2py.do("你好") => "ni hao"
+
TraditionalAndSimplified.conv_t2s("鳳凰") => "凤凰"
+
TraditionalAndSimplified.conv_s2t("无心插柳柳成阴") => "無心插柳柳成陰"
+
Hz2py.do("你好", :join_with => '-') => "ni-hao"
+
Hz2py.do("愛你", :join_with => '-', :to_simplified => true) => "ai-ni"
== Test
rspec spec/
\ No newline at end of file