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?, #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.



184
185
186
187
188
189
190
191
192
# File 'lib/asciidoctor/table.rb', line 184

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.



182
183
184
# File 'lib/asciidoctor/table.rb', line 182

def style
  @style
end

Instance Method Details

#block?Boolean

Returns:

  • (Boolean)


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

def block?
  false
end

#inline?Boolean

Returns:

  • (Boolean)


217
218
219
# File 'lib/asciidoctor/table.rb', line 217

def inline?
  false
end