Class: MigrationButton::RunnerController::Page::Migration

Inherits:
Struct
  • Object
show all
Defined in:
app/controllers/migration_button/runner_controller.rb

Constant Summary collapse

NO_FILE =
'********** NO FILE **********'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



64
65
66
# File 'app/controllers/migration_button/runner_controller.rb', line 64

def name
  @name
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



64
65
66
# File 'app/controllers/migration_button/runner_controller.rb', line 64

def state
  @state
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



64
65
66
# File 'app/controllers/migration_button/runner_controller.rb', line 64

def version
  @version
end

Instance Method Details

#down?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'app/controllers/migration_button/runner_controller.rb', line 71

def down?
  state == "down"
end

#runnable?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'app/controllers/migration_button/runner_controller.rb', line 67

def runnable?
  name != NO_FILE
end

#up?Boolean

Returns:

  • (Boolean)


75
76
77
# File 'app/controllers/migration_button/runner_controller.rb', line 75

def up?
  !down?
end