Class: Slamdown::Conversion::Tables::Cell
- Inherits:
-
Object
- Object
- Slamdown::Conversion::Tables::Cell
- 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
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#placeholder_source ⇒ Object
readonly
Returns the value of attribute placeholder_source.
Instance Method Summary collapse
-
#initialize(node = nil, placeholder_source = nil, materialise = true) ⇒ Cell
constructor
A new instance of Cell.
- #materialise? ⇒ Boolean
- #placeholder? ⇒ Boolean
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
#node ⇒ Object (readonly)
Returns the value of attribute node.
40 41 42 |
# File 'lib/slamdown/conversion/tables.rb', line 40 def node @node end |
#placeholder_source ⇒ Object (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
53 54 55 |
# File 'lib/slamdown/conversion/tables.rb', line 53 def materialise? @materialise end |
#placeholder? ⇒ Boolean
49 50 51 |
# File 'lib/slamdown/conversion/tables.rb', line 49 def placeholder? node.nil? end |