Class: ClickHouse::MigrationSupport::MigrationProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/click_house/migration_support/migration_context.rb

Overview

MigrationProxy is used to defer loading of the actual migration classes until they are needed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection, name, version, filename, scope) ⇒ MigrationProxy

Returns a new instance of MigrationProxy.



75
76
77
78
79
80
81
82
83
# File 'lib/click_house/migration_support/migration_context.rb', line 75

def initialize(connection, name, version, filename, scope)
  @connection = connection
  @name = name
  @version = version
  @filename = filename
  @scope = scope

  @migration = nil
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



73
74
75
# File 'lib/click_house/migration_support/migration_context.rb', line 73

def filename
  @filename
end

#nameObject (readonly)

Returns the value of attribute name.



73
74
75
# File 'lib/click_house/migration_support/migration_context.rb', line 73

def name
  @name
end

#scopeObject (readonly)

Returns the value of attribute scope.



73
74
75
# File 'lib/click_house/migration_support/migration_context.rb', line 73

def scope
  @scope
end

#versionObject (readonly)

Returns the value of attribute version.



73
74
75
# File 'lib/click_house/migration_support/migration_context.rb', line 73

def version
  @version
end

Instance Method Details

#basenameObject



85
86
87
# File 'lib/click_house/migration_support/migration_context.rb', line 85

def basename
  File.basename(filename)
end