Class: MiniHTML::AST::Position
- Inherits:
-
Object
- Object
- MiniHTML::AST::Position
- Defined in:
- lib/minihtml/ast/position.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Instance Method Summary collapse
-
#initialize(line:, column:, offset:) ⇒ Position
constructor
A new instance of Position.
Constructor Details
#initialize(line:, column:, offset:) ⇒ Position
Returns a new instance of Position.
8 9 10 11 12 |
# File 'lib/minihtml/ast/position.rb', line 8 def initialize(line:, column:, offset:) @line = line @column = column @offset = offset end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
6 7 8 |
# File 'lib/minihtml/ast/position.rb', line 6 def column @column end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
6 7 8 |
# File 'lib/minihtml/ast/position.rb', line 6 def line @line end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
6 7 8 |
# File 'lib/minihtml/ast/position.rb', line 6 def offset @offset end |