Module: DataMapper::Is::Remixable::RemixeeClassMethods

Defined in:
lib/dm-is-remixable/is/remixable.rb

Overview

  • RemixeeClassMethods

Description

Methods available to any model that is :remixable

Instance Method Summary collapse

Instance Method Details

#auto_migrate_down!(args = nil) ⇒ Object



446
447
448
# File 'lib/dm-is-remixable/is/remixable.rb', line 446

def auto_migrate_down!(args=nil)
  DataMapper.logger.warn("Skipping auto_migrate_down! for remixable module (#{self.name})")
end

#auto_migrate_up!(args = nil) ⇒ Object

Squash auto_migrate! model.auto_migrate! never gets called directly from dm-core/auto_migrations.rb The models are explicitly migrated down and up again.



442
443
444
# File 'lib/dm-is-remixable/is/remixable.rb', line 442

def auto_migrate_up!(args=nil)
  DataMapper.logger.warn("Skipping auto_migrate_up! for remixable module (#{self.name})")
end

#auto_upgrade!(args = nil) ⇒ Object

Squash auto_upgrade!



451
452
453
# File 'lib/dm-is-remixable/is/remixable.rb', line 451

def auto_upgrade!(args=nil)
  DataMapper.logger.warn("Skipping auto_upgrade! for remixable module (#{self.name})")
end

#suffix(sfx = nil) ⇒ Object

  • suffix

Description

modifies the storage name suffix, which is by default based on the Remixable Module name

Parameters

suffix <String> storage name suffix to use (singular)


434
435
436
437
# File 'lib/dm-is-remixable/is/remixable.rb', line 434

def suffix(sfx=nil)
  @suffix = sfx unless sfx.nil?
  @suffix
end