Class: Ibex::BisonImport::Action
- Inherits:
-
Object
- Object
- Ibex::BisonImport::Action
- Defined in:
- lib/ibex/bison_import.rb
Overview
One opaque C action and its mechanical reference rewrite.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
: Integer.
-
#encoded ⇒ Object
readonly
: String.
-
#id ⇒ Object
readonly
: Integer.
-
#line ⇒ Object
readonly
: Integer.
-
#original ⇒ Object
readonly
: String.
-
#transformed ⇒ Object
readonly
: String.
Instance Method Summary collapse
-
#initialize(id:, line:, column:, original:, transformed:, encoded:) ⇒ Action
constructor
A new instance of Action.
- #to_h ⇒ 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 ⇒ Object (readonly)
: Integer
99 100 101 |
# File 'lib/ibex/bison_import.rb', line 99 def column @column end |
#encoded ⇒ Object (readonly)
: String
102 103 104 |
# File 'lib/ibex/bison_import.rb', line 102 def encoded @encoded end |
#id ⇒ Object (readonly)
: Integer
97 98 99 |
# File 'lib/ibex/bison_import.rb', line 97 def id @id end |
#line ⇒ Object (readonly)
: Integer
98 99 100 |
# File 'lib/ibex/bison_import.rb', line 98 def line @line end |
#original ⇒ Object (readonly)
: String
100 101 102 |
# File 'lib/ibex/bison_import.rb', line 100 def original @original end |
#transformed ⇒ Object (readonly)
: String
101 102 103 |
# File 'lib/ibex/bison_import.rb', line 101 def transformed @transformed end |
Instance Method Details
#to_h ⇒ 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 |