Module | Populate
In: | lib/facets/more/populate.rb

A class mixin for objects which initialize using a hash or block to simply populate attr_writers/accessors.

      class MyClass
        include Populate
        attr :a
      end

      m = MyClass.new(:a=>1)
      m.a  #=> 1

      m = MyClass.new{ |s| s.a = 1 }
      m.a  #=> 1

### Methods

after_initialize_populate before_initialize_populate new

### Public Class methods

new( data=nil ) {|| ...}

Populating initializer.

### Public Instance methods

after_initialize_populate()
before_initialize_populate()

When using, a class should generally leave the initializer alone and just fillout these two callbacks as needed.

[Validate]