Project

L2

0.0
The project is in a healthy, maintained state
Message utilities for the Ruby console.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Lesli Ruby Message logo

Message utilities for the Ruby console

Version 0.5.2

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add l2

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install l2

Rails apps

$ gem "L2", "~> 0.4.0"

Usage

Simple message:

L2.m("hola")
L2.m("hola", "hello", "hallo", 1, [2], {"a":"b"})

Simple message with dividing line:

L2.msg("hola")
L2.msg("hola", "hello", "hallo", 1, [2], {"a":"b"})

Informative message:

L2.info("hola")
L2.info("hola", "hello", "hallo", 1, [2], {"a":"b"})

Sucessful message:

L2.success("hola")
L2.success("hola", "hello", "hallo", 1, [2], {"a":"b"})

Simple message:

L2.warning("hola")
L2.warning("hola", "hello", "hallo", 1, [2], {"a":"b"})

Error message:

L2.danger("hola")
L2.danger("hola", "hello", "hallo", 1, [2], {"a":"b"})

Error with flashing message:

L2.fatal("hola")
L2.fatal("hola", "hello", "hallo", 1, [2], {"a":"b"})

Flashing message:

L2.alert("hola")
L2.alert("hola", "hello", "hallo", 1, [2], {"a":"b"})

Useful to give instructions in deprecated methods or code:

L2.deprecation("hola")

Print a simple list:

L2.list("hola", "hello", "hallo", 1, [2], {"a":"b"})

Show data as table:

L2.table([
    { español: "hola", english: "hello", deutsch: "hallo" },
    { español: "hola", english: "hello", deutsch: "hallo" },
    { español: "hola", english: "hello", deutsch: "hallo" }
])

Display a cow message:

L2.cow("Hello little cow!")

Development


After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing


Bug reports and pull requests are welcome on GitHub at https://github.com/LesliTech/l2.

License


Software developed in Guatemala distributed under the General Public License v 3.0 you can read the full license here

LesliTech logo