Class: Ibex::BisonImport::Directive
- Inherits:
-
Object
- Object
- Ibex::BisonImport::Directive
- Defined in:
- lib/ibex/bison_import.rb
Overview
One directive occurrence and its original source position.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
: Integer.
-
#detail ⇒ Object
readonly
: String.
-
#line ⇒ Object
readonly
: Integer.
-
#name ⇒ Object
readonly
: String.
-
#status ⇒ Object
readonly
: Symbol.
Instance Method Summary collapse
-
#initialize(name:, status:, line:, column:, detail:) ⇒ Directive
constructor
A new instance of Directive.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, status:, line:, column:, detail:) ⇒ Directive
Returns a new instance of Directive.
80 81 82 83 84 85 86 87 |
# File 'lib/ibex/bison_import.rb', line 80 def initialize(name:, status:, line:, column:, detail:) @name = name.freeze @status = status @line = line @column = column @detail = detail.freeze freeze end |
Instance Attribute Details
#column ⇒ Object (readonly)
: Integer
76 77 78 |
# File 'lib/ibex/bison_import.rb', line 76 def column @column end |
#detail ⇒ Object (readonly)
: String
77 78 79 |
# File 'lib/ibex/bison_import.rb', line 77 def detail @detail end |
#line ⇒ Object (readonly)
: Integer
75 76 77 |
# File 'lib/ibex/bison_import.rb', line 75 def line @line end |
#name ⇒ Object (readonly)
: String
73 74 75 |
# File 'lib/ibex/bison_import.rb', line 73 def name @name end |
#status ⇒ Object (readonly)
: Symbol
74 75 76 |
# File 'lib/ibex/bison_import.rb', line 74 def status @status end |
Instance Method Details
#to_h ⇒ Object
90 91 92 |
# File 'lib/ibex/bison_import.rb', line 90 def to_h { name: @name, status: @status, line: @line, column: @column, detail: @detail } end |