Class: Symbol
Instance Method Summary collapse
Instance Method Details
#html(body = '', attrs = {}) ⇒ Object
153 154 155 156 157 |
# File 'lib/engine2/core.rb', line 153 def html body = '', attrs = {} element = self.to_s attrs = attrs.map{|k, v| "#{k}=\"#{v}\""}.join(" ") "<#{element} #{attrs}>#{body}</#{element}>" end |
#icon ⇒ Object
136 137 138 139 140 141 142 143 |
# File 'lib/engine2/core.rb', line 136 def icon s = self if s[0, 3] == 'fa_' "<i class='fa fa-#{s[3 .. -1]}'></i>" else "<span class='glyphicon glyphicon-#{s}'></span>" end end |
#q(col) ⇒ Object
149 150 151 |
# File 'lib/engine2/core.rb', line 149 def q col col.qualify self end |