Class: MakeYamlFrontMatter
- Inherits:
-
Object
- Object
- MakeYamlFrontMatter
- Defined in:
- lib/legal_markdown/make_yaml_frontmatter.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ MakeYamlFrontMatter
constructor
A new instance of MakeYamlFrontMatter.
Constructor Details
#initialize(args) ⇒ MakeYamlFrontMatter
Returns a new instance of MakeYamlFrontMatter.
6 7 8 9 10 11 12 13 |
# File 'lib/legal_markdown/make_yaml_frontmatter.rb', line 6 def initialize(args) @input_file = args[-2] ? args[-2] : args[-1] @output_file = args[-1] find_yaml_if_yaml load scan_and_filter_yaml build_new_yaml_frontmatter unless @yaml_data_as_array == [{},{},{},{},{}] write_it end |