Module: GcalMapper::Mapper::ActiveRecord

Defined in:
lib/gcal_mapper/mapper/active_record.rb

Overview

module to include when active record is in use

Defined Under Namespace

Classes: ActiveRecord

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

execute when the file is included

Parameters:

  • base (Class)

    class of the includer



13
14
15
16
17
# File 'lib/gcal_mapper/mapper/active_record.rb', line 13

def self.included(base)
  base.extend(GcalMapper::Mapper::ClassMethods)
  Mapper.base = base
  Mapper.adapter = ActiveRecord.new(base)
end