Project

lipsum

0.0
No commit activity in last 3 years
No release in over 3 years
This class allow you to retrive "lorem ipsum" placeholder text from lipsum.com.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

This class allow you to retrive “lorem ipsum” placeholder text from lipsum.com.

What is “lorem ipsum”?¶ ↑

“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.” (from lipsum.com)

Synopsys¶ ↑

require 'lipsum'

t = Lipsum.new( )
t.paragraphs[3]

puts t

or

puts Lipsum.paragraphs[3]

Initialization¶ ↑

Lipsum::new( start = true )

If start is set to true, the placeholder text will start with ‘Lorem ipsum dolor sit amet…’.

Create paragraphs, words, bytes or lists¶ ↑

Lipsum.paragraphs[size]
Lipsum.words[size]
Lipsum.bytes[size]
Lipsum.lists[size]

With those methods, you can create placeholder texts with size ‘size’

You can also use

Lipsum#paragraphs![size]

which is the same thing as

Lipsum.new(true).paragraphs[size]

or

Lipsum#paragraphs[size]

which is the same thing as

Lipsum.new(false).paragraphs[size]

This is also avalaible for words, bytes ans lists

Print¶ ↑

Lipsum.to_s
Lipsum.to_html

You can just ‘puts’ the Lipsum instance to print the text version. If you want an html version, use Lipsum.to_html

Requirements¶ ↑

This lib require nokogiri : nokogiri.rubyforge.org/nokogiri/

Licence¶ ↑

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see www.gnu.org/licenses/.