Class: SchemaEvolutionManager::MigrationFile::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/schema-evolution-manager/migration_file.rb

Constant Summary collapse

ATTRIBUTES =
[Attribute.new("transaction", ["single", "none"])]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, valid_values) ⇒ Attribute

Returns a new instance of Attribute.



11
12
13
14
# File 'lib/schema-evolution-manager/migration_file.rb', line 11

def initialize(name, valid_values)
  @name = Preconditions.check_not_blank(name, "name cannot be blank")
  @valid_values = Preconditions.assert_class(valid_values, Array)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/schema-evolution-manager/migration_file.rb', line 9

def name
  @name
end

#valid_valuesObject (readonly)

Returns the value of attribute valid_values.



9
10
11
# File 'lib/schema-evolution-manager/migration_file.rb', line 9

def valid_values
  @valid_values
end