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.



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_nameObject

Returns the value of attribute nr_name.



43
44
45
# File 'lib/yesroff/text.rb', line 43

def nr_name
  @nr_name
end

#single_lineObject

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