Sha256: 8df3d73a3a2fbf8d3349d61199f21bcef766d74b336eb60388395dc70d023137
Contents?: true
Size: 1.59 KB
Versions: 1
Compression:
Stored size: 1.59 KB
Contents
# Fossyl [![Build Status][build_status_image]][build_status] [![Code Climate][code_climate_image]][code_climate] Pre-historic Bencoding ## Installation Add this line to your application's Gemfile: gem 'fossyl' And then execute: $ bundle Or install it yourself as: $ gem install fossyl ## Usage ```ruby require "fossyl" # Encoding Fossyl.dump("strings") # => "7:strings" Fossyl.dump(12) # => "i12e" Fossyl.dump([1, "two", 3]) # => "li1e3:twoi3ee" Fossyl.dump(a: 1, b: "two", c: [1]) # => "d1:ai1e1:b3:two1:cli1eee" # Decoding Fossyl.load("7:strings") # => "strings" Fossyl.load("i12e") # => 12 Fossyl.load("li1e3:twoi3ee") # => [1, "two", 3] Fossyl.load("d1:ai1e1:b3:two1:cli1eee") # => { "a" => 1, "b" => "two", "c" => [1] } ``` ## Supported Platforms * Ruby 1.9.3 * JRuby _(1.9 mode)_ * Rubinius _(1.9 mode)_ ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request ## Copyright Copyright (c) 2012 [Adam Tanner][email]. See [License][license] for details. [email]: mailto:adam@adamtanner.org [license]: https://github.com/adamtanner/fossyl/blob/master/LICENSE.txt [build_status]: https://travis-ci.org/adamtanner/fossyl [build_status_image]: https://travis-ci.org/adamtanner/fossyl.png [code_climate]: https://codeclimate.com/github/adamtanner/fossyl [code_climate_image]: https://codeclimate.com/badge.png
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fossyl-0.5.1 | README.md |