Class: Rubex::DataType::UInt32

Inherits:
Object
  • Object
show all
Includes:
UIntHelpers
Defined in:
lib/rubex/data_type/u_int_32.rb

Instance Method Summary collapse

Methods included from UIntHelpers

#to_ruby_object

Methods included from Helpers

#==, #base_type, #c_function_ptr?, #char_ptr?, #to_ruby_object

Instance Method Details

#from_ruby_object(arg) ⇒ Object



9
10
11
# File 'lib/rubex/data_type/u_int_32.rb', line 9

def from_ruby_object(arg)
  "(int32_t)NUM2UINT(#{arg})"
end

#p_formatterObject



17
18
19
# File 'lib/rubex/data_type/u_int_32.rb', line 17

def p_formatter
  '%u'
end

#to_sObject



5
6
7
# File 'lib/rubex/data_type/u_int_32.rb', line 5

def to_s
  'uint32_t'
end

#uint32?Boolean

Returns:



13
14
15
# File 'lib/rubex/data_type/u_int_32.rb', line 13

def uint32?
  true
end