Class: SeccompTools::Asm::Token
- Inherits:
-
Object
- Object
- SeccompTools::Asm::Token
- Defined in:
- lib/seccomp-tools/asm/token.rb
Overview
Records information of a token.
Instance Attribute Summary collapse
-
#col ⇒ Object
readonly
Returns the value of attribute col.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#str ⇒ Object
readonly
Returns the value of attribute str.
-
#sym ⇒ Object
readonly
Returns the value of attribute sym.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
To compare with another Token object.
-
#initialize(sym, str, line, col) ⇒ Token
constructor
Instantiates a Token object.
Constructor Details
#initialize(sym, str, line, col) ⇒ Token
Instantiates a SeccompTools::Asm::Token object.
14 15 16 17 18 19 |
# File 'lib/seccomp-tools/asm/token.rb', line 14 def initialize(sym, str, line, col) @sym = sym @str = str @line = line @col = col end |
Instance Attribute Details
#col ⇒ Object (readonly)
Returns the value of attribute col.
7 8 9 |
# File 'lib/seccomp-tools/asm/token.rb', line 7 def col @col end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
7 8 9 |
# File 'lib/seccomp-tools/asm/token.rb', line 7 def line @line end |
#str ⇒ Object (readonly)
Returns the value of attribute str.
7 8 9 |
# File 'lib/seccomp-tools/asm/token.rb', line 7 def str @str end |
#sym ⇒ Object (readonly)
Returns the value of attribute sym.
7 8 9 |
# File 'lib/seccomp-tools/asm/token.rb', line 7 def sym @sym end |
Instance Method Details
#==(other) ⇒ Boolean
To compare with another SeccompTools::Asm::Token object.
24 25 26 |
# File 'lib/seccomp-tools/asm/token.rb', line 24 def ==(other) [other.sym, other.str, other.line, other.col] == [sym, str, line, col] end |