Class: MigrationButton::RunnerController::Page
- Inherits:
-
Object
- Object
- MigrationButton::RunnerController::Page
- Defined in:
- app/controllers/migration_button/runner_controller.rb
Defined Under Namespace
Classes: Migration
Instance Attribute Summary collapse
-
#last_request ⇒ Object
readonly
Returns the value of attribute last_request.
-
#migrations ⇒ Object
readonly
Returns the value of attribute migrations.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(migrations_status, output, last_request) ⇒ Page
constructor
A new instance of Page.
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_request ⇒ Object (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 |
#migrations ⇒ Object (readonly)
Returns the value of attribute migrations.
53 54 55 |
# File 'app/controllers/migration_button/runner_controller.rb', line 53 def migrations @migrations end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
53 54 55 |
# File 'app/controllers/migration_button/runner_controller.rb', line 53 def output @output end |