Class: ParagraphStyle
Instance Attribute Summary collapse
-
#nr_name ⇒ Object
Returns the value of attribute nr_name.
-
#single_line ⇒ Object
Returns the value of attribute single_line.
Attributes inherited from Style
Instance Method Summary collapse
-
#initialize(name, parent = nil, nr_name = '', single_line = true) ⇒ ParagraphStyle
constructor
A new instance of ParagraphStyle.
- #render(w) ⇒ Object
Methods inherited from Style
Constructor Details
#initialize(name, parent = nil, nr_name = '', single_line = true) ⇒ ParagraphStyle
Returns a new instance of ParagraphStyle.
45 46 47 48 49 |
# File 'lib/yesroff/text.rb', line 45 def initialize(name, parent=nil, nr_name='', single_line=true) super(name, parent) @nr_name = nr_name @single_line = single_line end |
Instance Attribute Details
#nr_name ⇒ Object
Returns the value of attribute nr_name.
43 44 45 |
# File 'lib/yesroff/text.rb', line 43 def nr_name @nr_name end |
#single_line ⇒ Object
Returns the value of attribute single_line.
43 44 45 |
# File 'lib/yesroff/text.rb', line 43 def single_line @single_line end |
Instance Method Details
#render(w) ⇒ Object
51 52 53 54 |
# File 'lib/yesroff/text.rb', line 51 def render(w) base = self.base_style w.switch_para_style(base.nr_name, base.single_line) end |