Sha256: b679d50f6690f90aa326cb5589b9e4224980efaab792e565f2e661094ae30a4f

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

[![Build Status|align=right|float](https://secure.travis-ci.org/rubyworks/bang.png)](http://travis-ci.org/rubyworks/real)

[Homepage](http://rubyworks.github.com/real) |
[Support](http://github.com/rubyworks/real/issues) |
[Source Code](http://github.com/rubyworks/real)


# Real

There is a problem in the realm of Ruby metaprogramming --objects
can be liers. You see, there is no guaruntee that the return value of 
a method is the "truth". Any object can play dirty tricks.

    string = "Watch this..."

    def string.class
      nil
    end

    string.class  #=> nil

We are never going to know what the *real* class of that object is
by asking it. So what can we do?

I've advocated for explict meta-programming methods be added to Ruby
for a long time. So far to no avail. Finally, I've decided I could 
at least provide my own library that provides the functionality.

    require 'real'

    $real.class(string)  #=> String


### Installation

Putting the old RubyGems to work:

    $ gem install real


### Copyrights

Real is copyrighted open source software.

    Copyright (c) 2012 Rubyworks (BSD-2-Clause)

You many redistribute or modify this work in accordance with the **BSD-2-Clause** license.

See LICENSE.txt for details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
real-0.1.0 README.md