Module: Humanoid::Fields

Defined in:
lib/humanoid/fields.rb

Overview

:nodoc

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/humanoid/fields.rb', line 4

def self.included(base)
  base.class_eval do
    extend ClassMethods
    # Set up the class attributes that must be available to all subclasses.
    # These include defaults, fields
    class_inheritable_accessor :defaults, :fields

    self.defaults = {}
    self.fields = {}

    delegate :defaults, :fields, :to => "self.class"
  end
end