Feature::BasicInitialize

Basic initializer for a class

Overview

require "feature/basic_initialize"

class Person
  Feature::BasicInitialize.load(self)

  attr_accessor :name, :age

  def self.defaults
    {likes_coffee: true}
  end
end

Person.new(name: "Joe", age: 29)

Full documentation is available at rubydoc.info.

Setup

This project is a sub. Sub setup example is available here.

For more info on subs, click here.

Cheers!

— Alex Fortuna, © 2015