Class: Strling::Core::IRAnchor

Inherits:
IROp
  • Object
show all
Defined in:
lib/strling/core/ir.rb

Overview

Represents an anchor position assertion in the IR.

Anchors match positions rather than characters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(at) ⇒ IRAnchor

Returns a new instance of IRAnchor.

Parameters:

  • at (String)

    The anchor type



104
105
106
# File 'lib/strling/core/ir.rb', line 104

def initialize(at)
  @at = at
end

Instance Attribute Details

#atString

Returns The anchor type.

Returns:

  • (String)

    The anchor type



101
102
103
# File 'lib/strling/core/ir.rb', line 101

def at
  @at
end

Instance Method Details

#to_dictObject



108
109
110
# File 'lib/strling/core/ir.rb', line 108

def to_dict
  { 'ir' => 'Anchor', 'at' => at }
end