Class: Vitae::Nodes::SimpleTagCloudNode

Inherits:
Node
  • Object
show all
Defined in:
lib/vitae/server/node.rb

Instance Attribute Summary

Attributes inherited from Node

#data, #level, #name, #path

Instance Method Summary collapse

Methods inherited from Node

#child_node_class, #child_node_class_from_name, #child_node_class_from_yaml, #collection_wrapper, #html, #initialize, #node_wrapper, #output_data, set, #show_data, #to_s, types

Methods included from Helpers

#content_tag, #current_theme, #include_theme_css, #include_theme_js, #link_to, #tag

Constructor Details

This class inherits a constructor from Vitae::Nodes::Node

Instance Method Details

#show_hashObject



139
140
141
142
143
144
145
146
# File 'lib/vitae/server/node.rb', line 139

def show_hash
  collection_wrapper do
    output_data.each_with_index do |(key, value), index|
      percent = ((output_data.size-index)/output_data.size.to_f)*70 + 75
      haml_tag "li.skill", key, :style => "font-size:#{percent}%;"
    end
  end
end