Class: Keepachangelog::MarkdownPrinter
- Defined in:
- lib/keepachangelog/printer/markdown.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#versions ⇒ Object
Returns the value of attribute versions.
Instance Method Summary collapse
-
#initialize(versions, options = {}) ⇒ MarkdownPrinter
constructor
A new instance of MarkdownPrinter.
- #to_s ⇒ Object
Constructor Details
#initialize(versions, options = {}) ⇒ MarkdownPrinter
Returns a new instance of MarkdownPrinter.
6 7 8 9 |
# File 'lib/keepachangelog/printer/markdown.rb', line 6 def initialize(versions, = {}) self. = self.versions = versions end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/keepachangelog/printer/markdown.rb', line 3 def @options end |
#versions ⇒ Object
Returns the value of attribute versions.
4 5 6 |
# File 'lib/keepachangelog/printer/markdown.rb', line 4 def versions @versions end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/keepachangelog/printer/markdown.rb', line 11 def to_s [ "# #{[:title] || default_title}", clean_intro([:intro]) || default_intro, '', parse_versions(versions), anchors ].flatten.join("\n") end |