Class: Scribble::Nodes::Node
- Inherits:
-
Object
- Object
- Scribble::Nodes::Node
- Defined in:
- lib/scribble/nodes/node.rb
Instance Attribute Summary collapse
-
#slice ⇒ Object
readonly
Returns the value of attribute slice.
Instance Method Summary collapse
- #block? ⇒ Boolean
-
#initialize(slice) ⇒ Node
constructor
A new instance of Node.
- #line_and_column ⇒ Object
- #split? ⇒ Boolean
Constructor Details
#initialize(slice) ⇒ Node
Returns a new instance of Node.
6 7 8 |
# File 'lib/scribble/nodes/node.rb', line 6 def initialize slice @slice = slice end |
Instance Attribute Details
#slice ⇒ Object (readonly)
Returns the value of attribute slice.
4 5 6 |
# File 'lib/scribble/nodes/node.rb', line 4 def slice @slice end |
Instance Method Details
#block? ⇒ Boolean
10 11 12 |
# File 'lib/scribble/nodes/node.rb', line 10 def block? false end |
#line_and_column ⇒ Object
18 19 20 21 |
# File 'lib/scribble/nodes/node.rb', line 18 def line_and_column line, column = slice.line_and_column "at line #{line} column #{column}" end |
#split? ⇒ Boolean
14 15 16 |
# File 'lib/scribble/nodes/node.rb', line 14 def split? false end |