Module: Rubex::DataType::Helpers
- Includes:
- Comparable
- Included in:
- Boolean, CArray, CFunction, CPtr, CStr, CStructOrUnion, Char, FloatHelpers, IntHelpers, RubyMethod, RubyObject, UChar, UIntHelpers, Void
- Defined in:
- lib/rubex/data_type_helpers/helpers.rb
Overview
Citations
Printf arguments:
http://www.thinkage.ca/english/gcos/expl/c/lib/printf.html
Instance Method Summary collapse
- #==(other) ⇒ Object
- #base_type ⇒ Object
- #c_function_ptr? ⇒ Boolean
-
#char_ptr? ⇒ Boolean
Helper function to know if a dtype is a char pointer.
- #from_ruby_object(arg) ⇒ Object
- #to_ruby_object(arg) ⇒ Object
Instance Method Details
#==(other) ⇒ Object
22 23 24 |
# File 'lib/rubex/data_type_helpers/helpers.rb', line 22 def ==(other) self.class == other.class end |
#base_type ⇒ Object
34 35 36 |
# File 'lib/rubex/data_type_helpers/helpers.rb', line 34 def base_type self end |
#c_function_ptr? ⇒ Boolean
43 44 45 |
# File 'lib/rubex/data_type_helpers/helpers.rb', line 43 def c_function_ptr? cptr? && base_type.c_function? end |
#char_ptr? ⇒ Boolean
Helper function to know if a dtype is a char pointer.
39 40 41 |
# File 'lib/rubex/data_type_helpers/helpers.rb', line 39 def char_ptr? cptr? && base_type.char? end |
#from_ruby_object(arg) ⇒ Object
30 31 32 |
# File 'lib/rubex/data_type_helpers/helpers.rb', line 30 def from_ruby_object(arg) arg end |
#to_ruby_object(arg) ⇒ Object
26 27 28 |
# File 'lib/rubex/data_type_helpers/helpers.rb', line 26 def to_ruby_object(arg) arg end |