Re: Get OpenStruct attributes
On Wed, Mar 12, 2008 at 12:54 PM, Jason Roelofs <jameskilton@gmail.com> wrote:
> The "dirty" way:
>
> >> o.instance_variable_get("@table")
> => {:field=>"this", :fold=>"that"}
That's actually the cleanest way - it's proof against singleton
methods being added to the object.
martin
|