Class: Pgtk::LiquicheckTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Pgtk::LiquicheckTask
- Defined in:
- lib/pgtk/liquicheck_task.rb
Overview
Liquicheck rake task for check Liquibase XML files.
- Author
-
Yegor Bugayenko (yegor256@gmail.com)
- Copyright
-
Copyright © 2019-2026 Yegor Bugayenko
- License
-
MIT
Instance Attribute Summary collapse
-
#dir ⇒ Object
Returns the value of attribute dir.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
Instance Method Summary collapse
-
#initialize(*args, &task_block) ⇒ LiquicheckTask
constructor
A new instance of LiquicheckTask.
Constructor Details
#initialize(*args, &task_block) ⇒ LiquicheckTask
Returns a new instance of LiquicheckTask.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pgtk/liquicheck_task.rb', line 17 def initialize(*args, &task_block) super() @name = args.shift || :liquicheck @dir = 'liquibase' @pattern = '*/*.xml' desc('Check the quality of Liquibase XML files') unless ::Rake.application.last_description task(name, *args) do |_, task_args| RakeFileUtils.verbose(true) do yield(*[self, task_args].slice(0, task_block.arity)) if block_given? run end end end |
Instance Attribute Details
#dir ⇒ Object
Returns the value of attribute dir.
15 16 17 |
# File 'lib/pgtk/liquicheck_task.rb', line 15 def dir @dir end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/pgtk/liquicheck_task.rb', line 15 def name @name end |
#pattern ⇒ Object
Returns the value of attribute pattern.
15 16 17 |
# File 'lib/pgtk/liquicheck_task.rb', line 15 def pattern @pattern end |