Module: Bumpspark::Helper
- Defined in:
- lib/bumpspark/helper.rb
Instance Method Summary collapse
-
#bumpspark_tag(numbers, html_opts = {}) ⇒ String
Generate a bumpspark-style sparkline image tag.
Instance Method Details
#bumpspark_tag(numbers, html_opts = {}) ⇒ String
Generate a bumpspark-style sparkline image tag
11 12 13 14 |
# File 'lib/bumpspark/helper.rb', line 11 def bumpspark_tag(numbers, html_opts={}) graph = Bumpspark::Graph.new(numbers) tag(:img, html_opts.merge(src: graph.to_data_uri)) end |