Class: MigrationButton::RunnerController::Page

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

Defined Under Namespace

Classes: Migration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(migrations_status, output, last_request) ⇒ Page

Returns a new instance of Page.



55
56
57
58
59
60
61
62
# File 'app/controllers/migration_button/runner_controller.rb', line 55

def initialize(migrations_status, output, last_request)
  @migrations = migrations_status.map do |(state, version, name)|
    Migration.new(state, version, name)
  end.sort_by(&:version).reverse

  @output = output
  @last_request = last_request
end

Instance Attribute Details

#last_requestObject (readonly)

Returns the value of attribute last_request.



53
54
55
# File 'app/controllers/migration_button/runner_controller.rb', line 53

def last_request
  @last_request
end

#migrationsObject (readonly)

Returns the value of attribute migrations.



53
54
55
# File 'app/controllers/migration_button/runner_controller.rb', line 53

def migrations
  @migrations
end

#outputObject (readonly)

Returns the value of attribute output.



53
54
55
# File 'app/controllers/migration_button/runner_controller.rb', line 53

def output
  @output
end