Class: Slamdown::Conversion::Tables::Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/slamdown/conversion/tables.rb

Overview

Represents either a source cell or an empty cell created by a source span.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node = nil, placeholder_source = nil, materialise = true) ⇒ Cell

Returns a new instance of Cell.



42
43
44
45
46
47
# File 'lib/slamdown/conversion/tables.rb', line 42

def initialize(node = nil, placeholder_source = nil, materialise = true)
	@node = node
	@placeholder_source = placeholder_source
	@materialise = materialise
	freeze
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



40
41
42
# File 'lib/slamdown/conversion/tables.rb', line 40

def node
  @node
end

#placeholder_sourceObject (readonly)

Returns the value of attribute placeholder_source.



40
41
42
# File 'lib/slamdown/conversion/tables.rb', line 40

def placeholder_source
  @placeholder_source
end

Instance Method Details

#materialise?Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/slamdown/conversion/tables.rb', line 53

def materialise?
	@materialise
end

#placeholder?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/slamdown/conversion/tables.rb', line 49

def placeholder?
	node.nil?
end