EGI-FCTF/rOCCI-cli

View on GitHub
lib/occi/cli/templates/links.erb

Summary

Maintainability
Test Coverage
<%- # We always get Occi::Core::Links -%>
<%- unless occi_links.blank? -%><%= '#' * (HighLine::SystemExtensions.terminal_size.first - 1) %><%- end %>
<%- occi_links.each do |link| -%>
[[ <%= link.kind.type_identifier %> ]]
>> location: <%= link.location %>
    <%- link.attributes.names.each_pair do |attribute, value| -%>
<%= attribute %> = <%= value %>
    <%- end -%>

Mixins:
    <%- link.mixins.each do |mixin| %>
    [[ <%= mixin.type_identifier %> ]]
    title:        <%= mixin.title %>
    term:         <%= mixin.term %>
    location:     <%= mixin.location %>
    <%- end -%>

Actions:
    <%- link.actions.each do |action| %>
    [[ <%= action.type_identifier %> ]]
    <%- end -%>
<%= '#' * (HighLine::SystemExtensions.terminal_size.first - 1) -%>

<%- end -%>