zh-lorem¶ ↑
This rubygem is a re-imelpmentation of MoreText lipsum service provided by Handlino Inc. See more at more.handlino.com/.
To use it, you ‘include ZhLorem::Helpers` in your code to include the following methods:
-
zh_lorem_name
-
zh_lorem_name_pinyin
-
zh_lorem_first_name
-
zh_lorem_first_name_pinyin
-
zh_lorem_last_name
-
zh_lorem_last_name_pinyin
-
zh_lorem_email
-
zh_lorem_word
-
zh_lorem_words(n)
-
zh_lorem_sentence
-
zh_lorem_sentences(n)
-
zh_lorem_paragraph
-
zh_lorem_paragraphs(n)
Methods named in plural form requires one numerical argument, others requires no arguments.
Alternatively, you may invoke methods on ‘ZhLorem` class, or its instance. The following statements are taking the same action:
puts zh_lorem_sentence puts ZhLorem.sentence puts ZhLorem.new.sentence
All methods takes an optional replacement argument at the end of argument list. The replacement is a String, which is the return value when provided.
That is:
puts zh_lorem_name("Wutang") #=> "Wutang"
This can be helpful when you need some tweaking.
Contributing to zh-lorem¶ ↑
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.
-
Fork the project.
-
Start a feature/bugfix branch.
-
Commit and push until you are happy with your contribution.
-
Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright¶ ↑
Copyright © 2012 Kang-min Liu. See LICENSE.txt for further details.