diff options
Diffstat (limited to 'lib/helpers.rb')
-rw-r--r-- | lib/helpers.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/helpers.rb b/lib/helpers.rb index d19e8f5..ab2e42c 100644 --- a/lib/helpers.rb +++ b/lib/helpers.rb @@ -44,6 +44,16 @@ helpers do COMP_MAP.invert[val] end + def render_version(ver) + vs = ver[1].split ':' + + if vs.size == 1 + '%s <strong>%s</strong>' % [h(reverse_xml_comp(ver[0])), h(ver[1])] + else + '%s <strong>%s</strong> in slot <strong>%s</strong>' % [h(reverse_xml_comp(ver[0])), h(vs[0]), h(vs[1])] + end + end + def yaml_dump(items) items.map do |item| { |