Class: Keepachangelog::YamlPrinter
- Defined in:
- lib/keepachangelog/printer/yaml.rb
Instance Attribute Summary collapse
-
#changelog ⇒ Object
Returns the value of attribute changelog.
Instance Method Summary collapse
-
#initialize(changelog) ⇒ YamlPrinter
constructor
A new instance of YamlPrinter.
- #write(path) ⇒ Object
Constructor Details
#initialize(changelog) ⇒ YamlPrinter
Returns a new instance of YamlPrinter.
7 8 9 |
# File 'lib/keepachangelog/printer/yaml.rb', line 7 def initialize(changelog) self.changelog = changelog end |
Instance Attribute Details
#changelog ⇒ Object
Returns the value of attribute changelog.
5 6 7 |
# File 'lib/keepachangelog/printer/yaml.rb', line 5 def changelog @changelog end |
Instance Method Details
#write(path) ⇒ Object
11 12 13 14 15 |
# File 'lib/keepachangelog/printer/yaml.rb', line 11 def write(path) FileUtils.mkdir_p(path) File.join(path, 'meta.yaml') write_versions path, changelog['versions'] end |