Class: Wizport::Html::Text
- Defined in:
- lib/wizport/document/html/text.rb
Instance Method Summary collapse
-
#initialize(html, txt, options = {}) ⇒ Text
constructor
options = {color:red, ‘font-size’:24, ‘text-align’ = left }.
Methods inherited from Element
Constructor Details
#initialize(html, txt, options = {}) ⇒ Text
options = {color:red, ‘font-size’:24, ‘text-align’ = left }
10 11 12 13 |
# File 'lib/wizport/document/html/text.rb', line 10 def initialize(html,txt, = {}) super html tag 'p', txt, {:style => .collect {|k, v| "#{k}:#{v}"}.join(';')}.delete_if {|k,v| v == nil || v == ''} end |