geemus/netrc — pull request #15 by avdi (2013-03-03 21:59:11+00:00)
Title: Return Entry objects from []

This makes it possible to read login and password like this:

```ruby
netrc = Netrc.read
entry = netrc['machine']
login = entry.login
pass = entry.password
```

Through the use of a lightly-tweaked Struct, the Entry object behaves almost identically to the old arrays, including implicit splatting when it is on the right side of an assignment:

```ruby
netrc = Netrc.read
entry = netrc['machine']
login, pass = entry
```

As a result, the old tests still pass with very minimal changes. However, I can't guarantee that this won't break some usage of the library somewhere. E.g. comparison to an Array might return `false` where once it returned `true`:

```ruby
['user', 'pass'] == netrc['machine'] # => false
```