Class: MigrationHistory::Formatter::Base
- Inherits:
-
Object
- Object
- MigrationHistory::Formatter::Base
show all
- Defined in:
- lib/migration_history/formatter/base.rb
Constant Summary
collapse
- DEFAULT_OUTPUT_FILE_NAME =
"migration_history"
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
10
11
12
13
|
# File 'lib/migration_history/formatter/base.rb', line 10
def initialize
@migration_actions = []
@output_file_name ||= DEFAULT_OUTPUT_FILE_NAME
end
|
Instance Attribute Details
#output_file_name ⇒ Object
Returns the value of attribute output_file_name.
6
7
8
|
# File 'lib/migration_history/formatter/base.rb', line 6
def output_file_name
@output_file_name
end
|
Instance Method Details
#file_extension ⇒ Object
19
20
21
|
# File 'lib/migration_history/formatter/base.rb', line 19
def file_extension
raise NotImplementedError
end
|
15
16
17
|
# File 'lib/migration_history/formatter/base.rb', line 15
def format(result_set)
raise NotImplementedError
end
|
#output_file_name_with_extension ⇒ Object
23
24
25
|
# File 'lib/migration_history/formatter/base.rb', line 23
def output_file_name_with_extension
"#{output_file_name}.#{file_extension}"
end
|