class Forma::Html::StyleAttr

Style attribute.

Attributes

styles[R]

Public Class Methods

new(styles) click to toggle source
# File lib/forma/html.rb, line 88
def initialize(styles)
  @styles = styles
end

Public Instance Methods

to_s() click to toggle source
# File lib/forma/html.rb, line 92
def to_s
  if @styles.present?
    %Q{style="#{@styles.map{ |k,v| "#{k}:#{v}" }.join(";")}"}
  end
end