Sha256: f8cafc6d195a645cc2a5effcbc885266f8b5065b5718fe2f3ac653ae2fe14230

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

* RbToolbox
[[https://travis-ci.org/iachettifederico/rb_toolbox][Build State]]: [[https://travis-ci.org/iachettifederico/rb_toolbox.svg]]

This gem contains some features I use all the time and aren't part of the standard library.



** Usage

*** Structs
I like my structs to be initialized using named instead of positional arguments.

=RbToolbox::Struct= uses named arguments.

It has all the features you may expect from a =::Struct=

To create a Struct:
#+BEGIN_SRC ruby
require "rb_toolbox/struct"
Point = RbToolbox::Struct.new(:x, :y)

p = Point.new(y: 5, x: 4)

p.x # => 4
p.y # => 5
#+END_SRC

#+results:

*** TODO String helpers (TODO)

** Installation

Add this line to your application's Gemfile:

    gem 'rb-toolbox'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rb-toolbox



** Contributing

1. Fork it ( https://github.com/[my-github-username]/rb-toolbox/fork )
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 a new Pull Request

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rb_toolbox-0.0.5 README.org
rb_toolbox-0.0.4 README.org