class ContributorsStats::Formatter::Html
generate html for a contributor, by default it will create a link to profile with contributor avatar
Constants
- DEFAULT_TEMPLATE
default template building link to profile with contributor avatar
Attributes
template[RW]
access to the template used to generate content
Public Class Methods
new(options = {})
click to toggle source
create the generator object @option template [String] the template to use, if not given default will be used
# File lib/plugins/contributors_stats/formatter/html.rb, line 13 def initialize(options = {}) @template = options[:template] || DEFAULT_TEMPLATE end
Public Instance Methods
format(login, data)
click to toggle source
format user data using template @param login [String] user name @param data [Hash] user data @return [String]
# File lib/plugins/contributors_stats/formatter/html.rb, line 21 def format(login, data) eval(template) end