Class: SeccompTools::Asm::Scalar::ConstVal
- Defined in:
- lib/seccomp-tools/asm/scalar.rb
Overview
A constant value, i.e. an immediate operand.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Compares by value, so a ConstVal equals the bare Integer it wraps.
-
#const? ⇒ Boolean
Always
true. -
#initialize(val) ⇒ ConstVal
constructor
Instantiates a ConstVal object.
Methods inherited from Base
#a?, #data?, #len?, #mem?, #x?
Constructor Details
#initialize(val) ⇒ ConstVal
Instantiates a SeccompTools::Asm::Scalar::ConstVal object.
96 97 98 99 |
# File 'lib/seccomp-tools/asm/scalar.rb', line 96 def initialize(val) @val = val super() end |
Instance Method Details
#==(other) ⇒ Boolean
Compares by value, so a SeccompTools::Asm::Scalar::ConstVal equals the bare Integer it wraps.
106 107 108 |
# File 'lib/seccomp-tools/asm/scalar.rb', line 106 def ==(other) to_i == other.to_i end |
#const? ⇒ Boolean
Returns Always true.
111 112 113 |
# File 'lib/seccomp-tools/asm/scalar.rb', line 111 def const? true end |