Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update README to add Trash.

  • Loading branch information...
commit 90ab29181e48884be3d67237be8dee7b83055357 1 parent 5a53de5
@mbleigh mbleigh authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 README.rdoc
View
14 README.rdoc
@@ -61,6 +61,20 @@ can set defaults for each property.
p.name # => 'Bob'
p.occupation # => 'Rubyist'
+== Trash
+
+A Trash is a Dash that allows you to translate keys on initialization.
+It is used like so:
+
+ class Person < Hashie::Trash
+ property :first_name, :from => :firstName
+ end
+
+This will automatically translate the <tt>firstName</tt> key to <tt>first_name</tt>
+when it is initialized using a hash such as through:
+
+ Person.new(:firstName => 'Bob')
+
== Clash
Clash is a Chainable Lazy Hash that allows you to easily construct
Please sign in to comment.
Something went wrong with that request. Please try again.