Module: GcalMapper::Mapper::ClassMethods

Defined in:
lib/gcal_mapper/mapper.rb

Overview

module to add class methods to the includer

Instance Method Summary collapse

Instance Method Details

#calendar(&block) ⇒ Object

provide dsl function

Parameters:

  • block (Block)

    contain dsl of th caller



61
62
63
64
65
# File 'lib/gcal_mapper/mapper.rb', line 61

def calendar(&block)
  Mapper.config = GcalMapper::Configuration.new
  dsl = DSL.new(Mapper.config)
  dsl.instance_eval(&block)
end

#synchronize_calendarObject

synchronize methods for the caller



69
70
71
# File 'lib/gcal_mapper/mapper.rb', line 69

def synchronize_calendar
  Sync.sync(Mapper.config, Mapper.base)
end