File: README.md

package info (click to toggle)
ruby-hashery 2.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, stretch
  • size: 400 kB
  • ctags: 283
  • sloc: ruby: 2,997; makefile: 7
file content (128 lines) | stat: -rw-r--r-- 4,366 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Hashery

[![Gem Version](http://img.shields.io/gem/v/hashery.svg?style=flat)](http://rubygems.org/gem/hashery)
[![Build Status](http://img.shields.io/travis/rubyworks/hashery.svg?style=flat)](http://travis-ci.org/rubyworks/hashery)
[![Fork Me](http://img.shields.io/badge/scm-github-blue.svg?style=flat)](http://github.com/rubyworks/hashery)
[![Report Issue](http://img.shields.io/github/issues/rubyworks/hashery.svg?style=flat)](http://github.com/rubyworks/hashery/issues)
[![Gittip](http://img.shields.io/badge/gittip-$1/wk-green.svg?style=flat)](https://www.gittip.com/rubyworksorg/)

[Homepage](http://rubyworks.github.com/hashery) ·
[Development](http://github.com/rubyworks/hashery) ·
[Report Issue](http://github.com/rubyworks/hashery/issues) ·
[Chat](https://kiwiirc.com/client/irc.freenode.net/?nick=user1|?#rubyworks)


## Description

Among Ruby Facets most common additions were an assortment
of Hash-like classes. To better support this collection
of libraries it was deemed prudent to create a new project
specifically for them. Hence the *Facets Hashery*.

Included in this collection are the widely used OrderedHash, 
the related but more featured Dictionary class, a number
of _open_ classes similar to the standard OpenStruct, 
some variations of the standard Hash class and a few
other yummy morsels.


## Usage

For instruction on usage, please see the individual library files
included in this collection and read the demo documents which give
examples of almost all features.


### Core Extensions

Hashery adds four core extensions of Ruby's Hash class: `#retrieve`,
`#rekey`, `#rekey!` and `Hash.create`. The first is simply an alias
for `#[]`. The later two have proven too useful over the years to
omit. And the last is a convenience class method for populating
a new hash with another hash upon initialization. All of these are
sorely missing for Ruby itself, which is why they are provided here.


## Installation

To install with RubyGems simply open a console and type:

    $ sudo gem install hashery

Or add it as a dependency to your project's Gemfile:

    gem "hashery"

Tarball packages are available for manual site installations
via [Ruby Setup](http://rubyworks.github.com/setup).


## Authors

Developers who have contributed code to the project include:

* Kirk Haines
* Joshua Hull
* Robert Klemme
* Jan Molic
* George Moschovitis
* Jeena Paradies
* Erik Veenstra


## Contributing

Don't be a lump on a log. See an issue? Have a suggestion? Want to help?
Well *git* in there!

### Communicating

The project is hosted on Github so the easiest means of communication 
is via the [Issues](http://github.com/rubyworks/hashery/issues) page.
For more direct communication you can try the **#rubyworks** IRC channel
on **irc.freenode.net**.

    [![IRC](https://kiwiirc.com/buttons/irc.freenode.net/rubyworks.png)](https://kiwiirc.com/client/irc.freenode.net/?nick=user1|?#rubyworks)

### Testing

Hashery uses [QED](http://rubyworks.github.com/qed) and
[Lemon](http://rubyworks.github.com/lemon) test frameworks.
The QED framework to create well tested high-level documentation.
Run the QED specs via:

    $ qed -Ilib demo/

Lemon is used to create low-level unit tests. Run these via the Rubytest:

    $ rubytest -Ilib -Itest test/

### Patches

Hashery's repository is hosted on [GitHub](http://github.com/rubyworks/hashery).
If you'd like to offer up a fix or feature, fork the repo and submit a pull
request (preferably in a topic branch). I assume you have heard
all the talk about proper [practices](https://github.com/rubyworks/rubyworks.github.com/wiki/GitHub-Best-Pactices),
so I won't bug you with it yet again.

### Donations

Yes, we FOSS programmers need to eat too! ;-) No seriously, any help you can
offer goes a long way toward continued development of Rubyworks projects,
including Hashery. Hop over to our [Gittips](https://www.gittip.com/rubyworksorg/)
page, or see the upper right-hand corner on the [Rubyworks](http://rubyworks.github.com) homepage.
Thanks!


## Copyrights

Copyright (c) 2010 Rubyworks

Licensed under the *BSD-2-Clause* license.

See LICENSE.txt file for further details.

Some libraries included in the Hashery have special copyrights
attributing specific authors. Please see each library script for
specifics and the NOTICE.txt file for an overview.