Project

spp

0.0
No release in over 3 years
Low commit activity in last 3 years
spp is super pretty print library.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0
~> 0.8.1
 Project Readme

Spp

spp ci Gem Version

spp is super pretty print library. It is useful for log output etc.

Installation

Add this line to your application's Gemfile:

gem 'spp'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install spp

Usage

How to use spp is easy.

Spp::spp('hoge')
=>
========== START ==========
"hoge"
========== E N D ==========

# same as below
# puts "========== START =========="
# pp 'hoge'
# puts "========== E N D =========="

You can also specify modifiers with arguments.

Spp::spp('hoge', 'start', 'end', 'πŸ˜ƒ' * 5)
=>
πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒ start πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒ
"hoge"
πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒ end πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒ

You can also pass the block and take the benchmark.

Spp::spp_bench('start', 'end', 'πŸ˜ƒ' * 5) do
  # some kind of processing
end
=>
πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒ start(2018-08-09 08:41:09.821 +0900) πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒ
"hoge"
πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒ end(2018-08-09 08:41:12.821 +0900) πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜ƒ

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Madogiwa0124/spp. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Spp project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.