Class: Span

Inherits:
Container show all
Defined in:
lib/yesroff/text.rb

Instance Attribute Summary collapse

Attributes inherited from Container

#contents, #parent, #style

Instance Method Summary collapse

Methods inherited from Container

#<<, #initialize, #length

Constructor Details

This class inherits a constructor from Container

Instance Attribute Details

#indentObject

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_sObject



125
126
127
# File 'lib/yesroff/text.rb', line 125

def to_s
  result = " Span: indent #{@indent} #{super} "
end