Module: MemoryIO::Types
- Defined in:
- lib/memory_io/types/types.rb,
lib/memory_io/types/type.rb,
lib/memory_io/types/c_str.rb,
lib/memory_io/types/number.rb
Overview
Module that includes multiple types.
Supported types are all descendants of Type.
Defined Under Namespace
Class Method Summary collapse
-
.find(name) ⇒ Symbol, Class?
private
Returns the class whose name matches
name. -
.get_proc(name, rw) ⇒ Proc?
Returns a callable object according to
name.
Class Method Details
.find(name) ⇒ Symbol, Class?
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 would search all descendants of Type.
32 33 34 |
# File 'lib/memory_io/types/types.rb', line 32 def find(name) Types::Type.find(Util.underscore(name.to_s).to_sym) end |
.get_proc(name, rw) ⇒ Proc?
Returns a callable object according to name.
51 52 53 54 |
# File 'lib/memory_io/types/types.rb', line 51 def get_proc(name, rw) klass = find(name) klass && klass.method(rw) end |