class EJX::Template::HTMLTag::AttributeValue
Public Class Methods
new(values)
click to toggle source
# File lib/ejx/template/html_tag/attribute_value.rb, line 3 def initialize(values) @values = values end
Public Instance Methods
to_js()
click to toggle source
# File lib/ejx/template/html_tag/attribute_value.rb, line 7 def to_js if @values.empty? JSON.generate('') else @values.map{ |v| v.is_a?(::String) ? JSON.generate(v) : v.value }.join(' + ') end end