Class: Asciidoctor::Table::Column

Inherits:
AbstractNode show all
Defined in:
lib/asciidoctor/table.rb

Overview

Methods to manage the columns of an AsciiDoc table. In particular, it keeps track of the column specs

Constant Summary

Constants included from Substitutors

Substitutors::CAN, Substitutors::CGI, Substitutors::DEL, Substitutors::ESC_R_SB, Substitutors::HighlightedPassSlotRx, Substitutors::PASS_END, Substitutors::PASS_START, Substitutors::PLUS, Substitutors::PassSlotRx, Substitutors::QuotedTextSniffRx, Substitutors::RS, Substitutors::R_SB, Substitutors::SUB_GROUPS, Substitutors::SUB_HINTS, Substitutors::SUB_OPTIONS, Substitutors::SpecialCharsRx, Substitutors::SpecialCharsTr

Instance Attribute Summary collapse

Attributes inherited from AbstractNode

#attributes, #context, #document, #id, #node_name, #parent

Instance Method Summary collapse

Methods inherited from AbstractNode

#add_role, #attr, #attr?, #converter, #enabled_options, #generate_data_uri, #generate_data_uri_from_uri, #has_role?, #icon_uri, #image_uri, #is_uri?, #media_uri, #normalize_asset_path, #normalize_system_path, #normalize_web_path, #option?, #read_asset, #read_contents, #reftext, #reftext?, #remove_attr, #remove_role, #role, #role=, #role?, #roles, #set_attr, #set_option, #update_attributes

Methods included from Substitutors

#apply_header_subs, #apply_normal_subs, #apply_reftext_subs, #apply_subs, #expand_subs, #extract_passthroughs, #highlight_source, #resolve_block_subs, #resolve_lines_to_highlight, #resolve_pass_subs, #resolve_subs, #restore_passthroughs, #sub_attributes, #sub_callouts, #sub_macros, #sub_post_replacements, #sub_quotes, #sub_replacements, #sub_source, #sub_specialchars

Methods included from Logging

#logger, #message_with_context

Constructor Details

#initialize(table, index, attributes = {}) ⇒ Column

Returns a new instance of Column.



181
182
183
184
185
186
187
188
189
# File 'lib/asciidoctor/table.rb', line 181

def initialize table, index, attributes = {}
  super table, :table_column
  @style = attributes['style']
  attributes['colnumber'] = index + 1
  attributes['width'] ||= 1
  attributes['halign'] ||= 'left'
  attributes['valign'] ||= 'top'
  update_attributes(attributes)
end

Instance Attribute Details

#styleObject

Get/Set the style Symbol for this column.



179
180
181
# File 'lib/asciidoctor/table.rb', line 179

def style
  @style
end

Instance Method Details

#block?Boolean

Returns:

  • (Boolean)


210
211
212
# File 'lib/asciidoctor/table.rb', line 210

def block?
  false
end

#inline?Boolean

Returns:

  • (Boolean)


214
215
216
# File 'lib/asciidoctor/table.rb', line 214

def inline?
  false
end