class Flammarion::Writeable::Paragraph

Public Class Methods

new(text, name, owner) click to toggle source
# File lib/cem/cflame/p.rb, line 9
def initialize(text, name, owner)
  @text = text
  @name = name
  @owner = owner
end

Public Instance Methods

html() click to toggle source
# File lib/cem/cflame/p.rb, line 15
def html
  %|<p id="#{@name}">#{@text}</p>|  
end
text=(newText) click to toggle source
# File lib/cem/cflame/p.rb, line 23
def text=(newText)
  return if newText == @text
  @text = newText    
  
  @owner.js("$( '##{@name}' ).replaceWith('#{html}');")
end
to_s() click to toggle source
# File lib/cem/cflame/p.rb, line 19
def to_s
  html
end