lotus/validations — pull request #14 by jodosha (2014-09-14 08:22:37+00:00)
Title: Type coercer accepts custom classes

Example:

```ruby
class FullName
def initialize(*names)
@names = names
end

def to_s
@names.join ' '
end
end

class UserValidator
include Lotus::Validations

attribute :full_name, type: FullName
end

validator = UserValidator.new(full_name: ['Luca', 'Guidi'])
validator.valid? # trigger coercions

puts validator.full_name.class # => FullName
puts validator.full_name # => "Luca Guidi"
```