Project

zh-lorem

0.0
No commit activity in last 3 years
No release in over 3 years
Chinese lorem ipsum text generator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.8.3
~> 3.12
~> 2.8.0
 Project Readme

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 © 2012 Kang-min Liu. See LICENSE.txt for further details.