Class: PactBroker::DB::VersionTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- PactBroker::DB::VersionTask
- Defined in:
- lib/pact_broker/tasks/version_task.rb
Instance Attribute Summary collapse
-
#database_connection ⇒ Object
Returns the value of attribute database_connection.
Instance Method Summary collapse
-
#initialize(&block) ⇒ VersionTask
constructor
A new instance of VersionTask.
- #rake_task(&block) ⇒ Object
Constructor Details
#initialize(&block) ⇒ VersionTask
Returns a new instance of VersionTask.
20 21 22 |
# File 'lib/pact_broker/tasks/version_task.rb', line 20 def initialize &block rake_task(&block) end |
Instance Attribute Details
#database_connection ⇒ Object
Returns the value of attribute database_connection.
18 19 20 |
# File 'lib/pact_broker/tasks/version_task.rb', line 18 def database_connection @database_connection end |
Instance Method Details
#rake_task(&block) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/pact_broker/tasks/version_task.rb', line 24 def rake_task &block namespace :pact_broker do namespace :db do desc "Display the current database migration version" task :version do instance_eval(&block) require "pact_broker/db/version" puts PactBroker::DB::Version.call(database_connection) end end end end |