Module: MemoryIO::Types
- Defined in:
- lib/memory_io/types/types.rb,
lib/memory_io/types/type.rb,
lib/memory_io/types/record.rb,
lib/memory_io/types/cpp/string.rb,
lib/memory_io/types/clang/c_str.rb,
lib/memory_io/types/basic/number.rb
Overview
Module that includes multiple types.
Supported types are all descendants of Type.
Defined Under Namespace
Modules: Basic, CPP, Clang Classes: Record, Type
Class Method Summary collapse
-
.find(name) ⇒ Symbol, ...
private
Returns the class whose name matches
name. -
.get_proc(name, rw) ⇒ Proc?
private
Returns a callable object according to
name.
Class Method Details
.find(name) ⇒ Symbol, ...
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the class whose name matches name.
This method will search all descendants of Type.
34 35 36 37 |
# File 'lib/memory_io/types/types.rb', line 34 def find(name) obj = Types::Type.find(name) obj&.obj end |
.get_proc(name, rw) ⇒ Proc?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a callable object according to name.
56 57 58 59 |
# File 'lib/memory_io/types/types.rb', line 56 def get_proc(name, rw) klass = find(name) klass&.method(rw) end |