Class: ActiveGroonga::MigrationEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/active_groonga/migrator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(migration, version, path) ⇒ MigrationEntry

Returns a new instance of MigrationEntry.



28
29
30
31
32
# File 'lib/active_groonga/migrator.rb', line 28

def initialize(migration, version, path)
  @migration = migration
  @version = version
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



27
28
29
# File 'lib/active_groonga/migrator.rb', line 27

def path
  @path
end

#versionObject (readonly)

Returns the value of attribute version.



27
28
29
# File 'lib/active_groonga/migrator.rb', line 27

def version
  @version
end

Instance Method Details

#migrate(direction, schema) ⇒ Object



38
39
40
41
# File 'lib/active_groonga/migrator.rb', line 38

def migrate(direction, schema)
  migration = @migration.new(@version, @path, schema)
  migration.migrate(direction)
end

#nameObject



34
35
36
# File 'lib/active_groonga/migrator.rb', line 34

def name
  @migration.migration_name
end