Class: DreamOps::BaseFormatter
- Inherits:
-
Object
- Object
- DreamOps::BaseFormatter
- Defined in:
- lib/dream-ops/formatters/base.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#cleanup_hook ⇒ Object
The cleanup hook is defined by subclasses and is called by the CLI.
-
#deprecation(*args) ⇒ Object
Create a formatter method for the declaration.
-
#error(*args) ⇒ Object
Create a formatter method for the declaration.
-
#fetch(*args) ⇒ Object
Create a formatter method for the declaration.
-
#info(*args) ⇒ Object
Create a formatter method for the declaration.
-
#install(*args) ⇒ Object
Create a formatter method for the declaration.
-
#list(*args) ⇒ Object
Create a formatter method for the declaration.
-
#msg(*args) ⇒ Object
Create a formatter method for the declaration.
-
#outdated(*args) ⇒ Object
Create a formatter method for the declaration.
-
#package(*args) ⇒ Object
Create a formatter method for the declaration.
-
#search(*args) ⇒ Object
Create a formatter method for the declaration.
-
#show(*args) ⇒ Object
Create a formatter method for the declaration.
-
#skipping(*args) ⇒ Object
Create a formatter method for the declaration.
-
#uploaded(*args) ⇒ Object
Create a formatter method for the declaration.
-
#use(*args) ⇒ Object
Create a formatter method for the declaration.
-
#vendor(*args) ⇒ Object
Create a formatter method for the declaration.
-
#version(*args) ⇒ Object
Create a formatter method for the declaration.
-
#warn(*args) ⇒ Object
Create a formatter method for the declaration.
Class Method Details
.formatter_method(name) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/dream-ops/formatters/base.rb', line 9 def formatter_method(name) class_eval <<-EOH, __FILE__, __LINE__ + 1 def #{name}(*args) raise AbstractFunction, "##{name} must be implemented on \#{self.class.name}!" end EOH end |
Instance Method Details
#cleanup_hook ⇒ Object
The cleanup hook is defined by subclasses and is called by the CLI.
41 |
# File 'lib/dream-ops/formatters/base.rb', line 41 def cleanup_hook; end |
#deprecation(*args) ⇒ Object
Create a formatter method for the declaration
20 |
# File 'lib/dream-ops/formatters/base.rb', line 20 formatter_method :deprecation |
#error(*args) ⇒ Object
Create a formatter method for the declaration
21 |
# File 'lib/dream-ops/formatters/base.rb', line 21 formatter_method :error |
#fetch(*args) ⇒ Object
Create a formatter method for the declaration
26 |
# File 'lib/dream-ops/formatters/base.rb', line 26 formatter_method :fetch |
#info(*args) ⇒ Object
Create a formatter method for the declaration
27 |
# File 'lib/dream-ops/formatters/base.rb', line 27 formatter_method :info |
#install(*args) ⇒ Object
Create a formatter method for the declaration
28 |
# File 'lib/dream-ops/formatters/base.rb', line 28 formatter_method :install |
#list(*args) ⇒ Object
Create a formatter method for the declaration
29 |
# File 'lib/dream-ops/formatters/base.rb', line 29 formatter_method :list |
#msg(*args) ⇒ Object
Create a formatter method for the declaration
22 |
# File 'lib/dream-ops/formatters/base.rb', line 22 formatter_method :msg |
#outdated(*args) ⇒ Object
Create a formatter method for the declaration
30 |
# File 'lib/dream-ops/formatters/base.rb', line 30 formatter_method :outdated |
#package(*args) ⇒ Object
Create a formatter method for the declaration
31 |
# File 'lib/dream-ops/formatters/base.rb', line 31 formatter_method :package |
#search(*args) ⇒ Object
Create a formatter method for the declaration
32 |
# File 'lib/dream-ops/formatters/base.rb', line 32 formatter_method :search |
#show(*args) ⇒ Object
Create a formatter method for the declaration
33 |
# File 'lib/dream-ops/formatters/base.rb', line 33 formatter_method :show |
#skipping(*args) ⇒ Object
Create a formatter method for the declaration
34 |
# File 'lib/dream-ops/formatters/base.rb', line 34 formatter_method :skipping |
#uploaded(*args) ⇒ Object
Create a formatter method for the declaration
35 |
# File 'lib/dream-ops/formatters/base.rb', line 35 formatter_method :uploaded |
#use(*args) ⇒ Object
Create a formatter method for the declaration
36 |
# File 'lib/dream-ops/formatters/base.rb', line 36 formatter_method :use |
#vendor(*args) ⇒ Object
Create a formatter method for the declaration
37 |
# File 'lib/dream-ops/formatters/base.rb', line 37 formatter_method :vendor |
#version(*args) ⇒ Object
Create a formatter method for the declaration
38 |
# File 'lib/dream-ops/formatters/base.rb', line 38 formatter_method :version |
#warn(*args) ⇒ Object
Create a formatter method for the declaration
23 |
# File 'lib/dream-ops/formatters/base.rb', line 23 formatter_method :warn |