class Waxy::Meta
Instances of Meta
contain attributes that describe the visual appearance of a single hexagon.
Attributes
colors[RW]
An Array (0..5) of SVG color values
fill[RW]
Hex fill not applicable to all templates
link[RW]
a URL for the whole hexagon not applicable to all templates
link_title[RW]
title value for hex <a>
pie_links[RW]
An Array (0..5) of links, one for each slice of 'Pie'
size[RW]
Array of 6 * (0.0..1.0)
scales "pie" slices
stroke[RW]
Hex border SVG stroke
Public Instance Methods
hex_link_end()
click to toggle source
# File lib/waxy/meta.rb, line 66 def hex_link_end '</a>' if link end
hex_link_start()
click to toggle source
Helper methods
# File lib/waxy/meta.rb, line 52 def hex_link_start return nil unless link [ '<a href="' + link + '"', 'class="waxy__link"', '>' ].compact.join(' ') end
hex_link_title()
click to toggle source
# File lib/waxy/meta.rb, line 61 def hex_link_title return nil unless link_title "<title>#{link_title}</title>" end
sum_size()
click to toggle source
Describes how “full” a pie hexagon is
# File lib/waxy/meta.rb, line 46 def sum_size size.sum end