Add `#inspect` and `.accessors` #1

Merged
merged 2 commits into from Apr 18, 2012

3 participants

@justinfrench

Hello, I wanted to get something hash-like back from MyModel#inspect. Previously, #inspect just delegated to #to_s, which I think is the default behaviour for Kernal#to_s. This is now way more bettererer, returning a hash of method names and values so that I can, you know, inspect stuff.

>> User.new(:name => "Joe").inspect
=> { :name => "Joe" }
@stevehodgkiss
Collaborator

+1

@stevehodgkiss stevehodgkiss merged commit d1bff1f into ryan-allen:master Apr 18, 2012
@justinfrench

@ryan-allen we regret that remark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment