Sha256: 2dc08987d3ef5d36d5f2d2e3d916b061e1a05100cf07c982cd9e56da47188004
Contents?: true
Size: 344 Bytes
Versions: 1
Compression:
Stored size: 344 Bytes
Contents
module EasyAsPie module ViewHelper # <div class="chart" data-percent="73">73%</div> def easy_as_pie percent, label = nil raise ArgumentError, "Must take a percent argument" unless percent pie_options = {:"data-percent" => percent} label ||= "#{percent}%" content_tag :div, label, pie_options end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
easy_as_pie-0.1.0 | lib/easy_as_pie/view_helper.rb |