Module: MiGA::Result::Versions
- Included in:
- MiGA::Result
- Defined in:
- lib/miga/result/versions.rb
Overview
Helper module including functions for results to handle software versions
Instance Method Summary collapse
-
#add_versions(versions) ⇒ Object
Add version information for the Software used by this result.
-
#versions ⇒ Object
Return the versions hash.
-
#versions_md ⇒ Object
Get list of software and their versions as raw text (Markdown).
Instance Method Details
#add_versions(versions) ⇒ Object
Add version information for the Software used by this result
14 15 16 |
# File 'lib/miga/result/versions.rb', line 14 def add_versions(versions) versions.each { |k, v| self[:versions][k.to_sym] = v } end |
#versions ⇒ Object
Return the versions hash
8 9 10 |
# File 'lib/miga/result/versions.rb', line 8 def versions self[:versions] end |
#versions_md ⇒ Object
Get list of software and their versions as raw text (Markdown)
20 21 22 |
# File 'lib/miga/result/versions.rb', line 20 def versions_md versions.map { |k, v| "- #{k}: #{v}" }.join("\n") end |