Class: ParagraphStyle

Inherits:
Style
  • Object
show all
Defined in:
lib/yesroff/text.rb

Instance Attribute Summary collapse

Attributes inherited from Style

#name, #parent

Instance Method Summary collapse

Methods inherited from Style

#base_style, #child_of?

Constructor Details

#initialize(name, parent = nil, nr_name = '', single_line = true) ⇒ ParagraphStyle

Returns a new instance of ParagraphStyle.



59
60
61
62
63
# File 'lib/yesroff/text.rb', line 59

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_nameObject

Returns the value of attribute nr_name.



57
58
59
# File 'lib/yesroff/text.rb', line 57

def nr_name
  @nr_name
end

#single_lineObject

Returns the value of attribute single_line.



57
58
59
# File 'lib/yesroff/text.rb', line 57

def single_line
  @single_line
end

Instance Method Details

#render(w) ⇒ Object



65
66
67
68
# File 'lib/yesroff/text.rb', line 65

def render(w)
  base = self.base_style
  w.switch_para_style(base.nr_name, base.single_line)
end