README.md in representable-1.4.0 vs README.md in representable-1.4.1

- old
+ new

@@ -556,16 +556,25 @@ ## Undocumented Features (Please don't read this section!) -If you need a special binding for a property you're free to create it using the `:binding` option. +* If you need a special binding for a property you're free to create it using the `:binding` option. property :title, :binding => lambda { |*args| JSON::TitleBinding.new(*args) } +* Lambdas are usually executed in the represented object's context. If your writing a `Decorator` representer and you need to execute lambdas in its context use the `:representer_exec` option. + class SongRepresenter < Representable::Decorator + property :title, :representer_exec => true, :getter => lambda {..} + end + +You can still access the represented object in the lambda using `represented`. In a module representer this option is ignored. + ## Copyright Representable started as a heavily simplified fork of the ROXML gem. Big thanks to Ben Woosley for his inspiring work. * Copyright (c) 2011-2013 Nick Sutterer <apotonick@gmail.com> * ROXML is Copyright (c) 2004-2009 Ben Woosley, Zak Mandhro and Anders Engstrom. + +Representable is released under the [MIT License](http://www.opensource.org/licenses/MIT). \ No newline at end of file