module Interview::HasHtmlOptions
Attributes
html_class[RW]
html_options[RW]
Public Class Methods
new(params={})
click to toggle source
Calls superclass method
# File lib/interview/has_html_options.rb, line 6 def initialize(params={}) @html_options = {} @html_class = [] super end
Public Instance Methods
html_class=(html_class)
click to toggle source
# File lib/interview/has_html_options.rb, line 12 def html_class=(html_class) if html_class.is_a? Array @html_class = html_class elsif html_class.is_a? String @html_class += html_class.split end end
Protected Instance Methods
options_to_html(html_options = @html_options, html_class = @html_class)
click to toggle source
# File lib/interview/has_html_options.rb, line 22 def options_to_html(html_options = @html_options, html_class = @html_class) opts = html_options.dup opts[:class] = html_class.join(' ') unless html_class.empty? return opts end