Module: BBLib::TypeInit

Defined in:
lib/mixins/type_init.rb

Overview

Requires Simple init to be loaded first. This sets up a very basic init foundation by adding a method called type and setting the init foundation method to it.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



7
8
9
10
11
12
# File 'lib/mixins/type_init.rb', line 7

def self.included(base)
  base.extend(ClassMethods)
  base.send(:bridge_method, :type)
  base.send(:serialize_method, :type, always: true)
  base.send(:setup_init_foundation, :type) { |a, b| a && b && a.to_s.to_sym == b.to_s.to_sym }
end