Class: Cassie::Schema::ApplyCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/cassie/schema/apply_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ ApplyCommand

Returns a new instance of ApplyCommand.



5
6
7
# File 'lib/cassie/schema/apply_command.rb', line 5

def initialize(version)
  @version = version
end

Instance Attribute Details

#versionObject (readonly)

Returns the value of attribute version.



3
4
5
# File 'lib/cassie/schema/apply_command.rb', line 3

def version
  @version
end

Instance Method Details

#directionObject



9
10
11
# File 'lib/cassie/schema/apply_command.rb', line 9

def direction
  :up
end

#executeObject



13
14
15
16
# File 'lib/cassie/schema/apply_command.rb', line 13

def execute
  version.migration.up
  apply
end