Class: SeccompTools::Asm::Statement
- Inherits:
-
Object
- Object
- SeccompTools::Asm::Statement
- Defined in:
- lib/seccomp-tools/asm/statement.rb
Overview
A statement after parsing the assembly. Each statement will be converted to a BPF.
Internally used by sasm.y.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#symbols ⇒ Object
readonly
Returns the value of attribute symbols.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type, data, symbols) ⇒ Statement
constructor
Instantiates a Statement object.
Constructor Details
#initialize(type, data, symbols) ⇒ Statement
Instantiates a SeccompTools::Asm::Statement object.
20 21 22 23 24 |
# File 'lib/seccomp-tools/asm/statement.rb', line 20 def initialize(type, data, symbols) @type = type @data = data @symbols = symbols end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
11 12 13 |
# File 'lib/seccomp-tools/asm/statement.rb', line 11 def data @data end |
#symbols ⇒ Object (readonly)
Returns the value of attribute symbols.
11 12 13 |
# File 'lib/seccomp-tools/asm/statement.rb', line 11 def symbols @symbols end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
11 12 13 |
# File 'lib/seccomp-tools/asm/statement.rb', line 11 def type @type end |
Instance Method Details
#==(other) ⇒ Object
27 28 29 |
# File 'lib/seccomp-tools/asm/statement.rb', line 27 def ==(other) [type, data, symbols] == [other.type, other.data, other.symbols] end |