Class: SeccompTools::Asm::Scalar::ConstVal

Inherits:
Base
  • Object
show all
Defined in:
lib/seccomp-tools/asm/scalar.rb

Overview

A constant value.

Instance Attribute Summary

Attributes inherited from Base

#val

Instance Method Summary collapse

Methods inherited from Base

#a?, #data?, #len?, #mem?, #x?

Constructor Details

#initialize(val) ⇒ ConstVal

Returns a new instance of ConstVal.

Parameters:

  • val (Integer)


71
72
73
74
# File 'lib/seccomp-tools/asm/scalar.rb', line 71

def initialize(val)
  @val = val
  super()
end

Instance Method Details

#==(other) ⇒ Object

Parameters:



77
78
79
# File 'lib/seccomp-tools/asm/scalar.rb', line 77

def ==(other)
  to_i == other.to_i
end

#const?Boolean

Returns:

  • (Boolean)


81
82
83
# File 'lib/seccomp-tools/asm/scalar.rb', line 81

def const?
  true
end