Class: Span
Instance Attribute Summary collapse
-
#indent ⇒ Object
Returns the value of attribute indent.
Attributes inherited from Container
Instance Method Summary collapse
Methods inherited from Container
Constructor Details
This class inherits a constructor from Container
Instance Attribute Details
#indent ⇒ Object
Returns the value of attribute indent.
113 114 115 |
# File 'lib/yesroff/text.rb', line 113 def indent @indent end |
Instance Method Details
#render(w) ⇒ Object
115 116 117 118 119 120 121 122 123 |
# File 'lib/yesroff/text.rb', line 115 def render(w) l = self.length #return if l == 0 and indent == 0 style.start(w) log "Indenting #{indent}" w.indent(indent) if indent super(w) unless l == 0 style.stop(w) end |
#to_s ⇒ Object
125 126 127 |
# File 'lib/yesroff/text.rb', line 125 def to_s result = " Span: indent #{@indent} #{super} " end |