Class: Ibex::BisonImport::Action
- Inherits:
-
Object
- Object
- Ibex::BisonImport::Action
- Defined in:
- lib/ibex/bison_import.rb,
sig/ibex/bison_import.rbs
Overview
One opaque C action and its mechanical reference rewrite.
Instance Attribute Summary collapse
- #column ⇒ Integer readonly
- #encoded ⇒ String readonly
- #id ⇒ Integer readonly
- #line ⇒ Integer readonly
- #original ⇒ String readonly
- #transformed ⇒ String readonly
Instance Method Summary collapse
-
#initialize(id:, line:, column:, original:, transformed:, encoded:) ⇒ Action
constructor
A new instance of Action.
- #to_h ⇒ Hash[Symbol, Object?]
Constructor Details
#initialize(id:, line:, column:, original:, transformed:, encoded:) ⇒ Action
Returns a new instance of Action.
106 107 108 109 110 111 112 113 114 |
# File 'lib/ibex/bison_import.rb', line 106 def initialize(id:, line:, column:, original:, transformed:, encoded:) @id = id @line = line @column = column @original = original.freeze @transformed = transformed.freeze @encoded = encoded.freeze freeze end |
Instance Attribute Details
#column ⇒ Integer (readonly)
99 100 101 |
# File 'lib/ibex/bison_import.rb', line 99 def column @column end |
#encoded ⇒ String (readonly)
102 103 104 |
# File 'lib/ibex/bison_import.rb', line 102 def encoded @encoded end |
#id ⇒ Integer (readonly)
97 98 99 |
# File 'lib/ibex/bison_import.rb', line 97 def id @id end |
#line ⇒ Integer (readonly)
98 99 100 |
# File 'lib/ibex/bison_import.rb', line 98 def line @line end |
#original ⇒ String (readonly)
100 101 102 |
# File 'lib/ibex/bison_import.rb', line 100 def original @original end |
#transformed ⇒ String (readonly)
101 102 103 |
# File 'lib/ibex/bison_import.rb', line 101 def transformed @transformed end |
Instance Method Details
#to_h ⇒ Hash[Symbol, Object?]
117 118 119 120 121 122 123 |
# File 'lib/ibex/bison_import.rb', line 117 def to_h { id: @id, line: @line, column: @column, original: @original, transformed: @transformed, source_encoding: "hex_sentinel" } end |