Parent

Methods

Class/Module Index [+]

Quicksearch

Sequel::SimpleMigration

Migration class used by the Sequel.migration DSL, using instances for each migration, unlike the Migration class, which uses subclasses for each migration. Part of the migration extension.

Attributes

down[RW]

Proc used for the down action

up[RW]

Proc used for the up action

Public Instance Methods

apply(db, direction) click to toggle source

Apply the appropriate block on the Database instance using instance_eval.

# File lib/sequel/extensions/migration.rb, line 73
def apply(db, direction)
  raise(ArgumentError, "Invalid migration direction specified (#{direction.inspect})") unless [:up, :down].include?(direction)
  if prok = send(direction)
    db.instance_eval(&prok)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.