Class: DbSchema::Changes::AddValueToEnum

Inherits:
Object
  • Object
show all
Defined in:
lib/db_schema/changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enum_name, new_value, before: nil) ⇒ AddValueToEnum

Returns a new instance of AddValueToEnum.



398
399
400
401
402
# File 'lib/db_schema/changes.rb', line 398

def initialize(enum_name, new_value, before: nil)
  @enum_name = enum_name
  @new_value = new_value
  @before    = before
end

Instance Attribute Details

#beforeObject (readonly)

Returns the value of attribute before.



396
397
398
# File 'lib/db_schema/changes.rb', line 396

def before
  @before
end

#enum_nameObject (readonly)

Returns the value of attribute enum_name.



396
397
398
# File 'lib/db_schema/changes.rb', line 396

def enum_name
  @enum_name
end

#new_valueObject (readonly)

Returns the value of attribute new_value.



396
397
398
# File 'lib/db_schema/changes.rb', line 396

def new_value
  @new_value
end

Instance Method Details

#add_to_the_end?Boolean

Returns:

  • (Boolean)


404
405
406
# File 'lib/db_schema/changes.rb', line 404

def add_to_the_end?
  before.nil?
end