mirego/encore — pull request #1 by remiprev (2013-08-30 03:58:05+00:00)
Title: Support :as key in `expose` class method

We now support `:as` as a way to expose a certain model column as another key.

```ruby
class UserEntity
include Encore::Entity
expose :name, as: :fullname
end

@entity = UserEntity.new

@entity.assign_attributes name: "Art Vandelay"
# raises Encore::Entity::Input::ProtectedAttributeError

@entity.assign_attributes fullname: "Art Vandelay"
@entity.object.name # => "Art Vandelay"
```