Class: MemoryIO::Types::Record Private
- Inherits:
-
Object
- Object
- MemoryIO::Types::Record
- Defined in:
- lib/memory_io/types/record.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class that handles a registered object in Type.find. For example, this class will parse inline-docs to generate README.md.
Instance Attribute Summary collapse
-
#keys ⇒ Array<Symbol>
readonly
private
All symbols that can find this record in Type.find.
-
#obj ⇒ Object
readonly
private
Whatever.
Instance Method Summary collapse
-
#doc ⇒ String
private
Get the doc string.
-
#initialize(object, keys, option = {}) ⇒ Record
constructor
private
Instantiate a Record object.
Constructor Details
#initialize(object, keys, option = {}) ⇒ Record
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.
Instantiate a MemoryIO::Types::Record object.
28 29 30 31 32 33 |
# File 'lib/memory_io/types/record.rb', line 28 def initialize(object, keys, option = {}) @obj = object @keys = keys @force_doc = option[:doc] @caller = option[:caller] end |
Instance Attribute Details
#keys ⇒ Array<Symbol> (readonly)
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 All symbols that can find this record in Type.find.
16 17 18 |
# File 'lib/memory_io/types/record.rb', line 16 def keys @keys end |
#obj ⇒ Object (readonly)
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 Whatever.
12 13 14 |
# File 'lib/memory_io/types/record.rb', line 12 def obj @obj end |
Instance Method Details
#doc ⇒ String
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.
Get the doc string.
41 42 43 44 45 46 |
# File 'lib/memory_io/types/record.rb', line 41 def doc return @force_doc if @force_doc return '' unless @caller parse_file_doc(@caller.absolute_path, @caller.lineno) end |