Class: ControlledTableColumn

Inherits:
TextLine show all
Defined in:
lib/almirah/doc_items/controlled_table.rb

Overview

rubocop:disable Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from TextLine

add_lazy_doc_id, #bold, #bold_and_italic, #format_string, #italic, #link

Methods inherited from TextLineBuilderContext

#bold, #bold_and_italic, #italic, #link

Constructor Details

#initialize(text) ⇒ ControlledTableColumn

rubocop:disable Lint/MissingSuper



7
8
9
# File 'lib/almirah/doc_items/controlled_table.rb', line 7

def initialize(text) # rubocop:disable Lint/MissingSuper
  @text = text.strip
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



5
6
7
# File 'lib/almirah/doc_items/controlled_table.rb', line 5

def text
  @text
end

Instance Method Details

#to_htmlObject



11
12
13
14
# File 'lib/almirah/doc_items/controlled_table.rb', line 11

def to_html
  f_text = format_string(@text)
  "\t\t<td>#{f_text}</td>\n\r"
end