method
marshal_dump
v2_5_5 -
Show latest stable
- Class:
RDoc::ClassModule
marshal_dump()public
TODO: filter included items by #display?
# File lib/rdoc/class_module.rb, line 300
def marshal_dump # :nodoc:
attrs = attributes.sort.map do |attr|
next unless attr.display?
[ attr.name, attr.rw,
attr.visibility, attr.singleton, attr.file_name,
]
end.compact
method_types = methods_by_type.map do |type, visibilities|
visibilities = visibilities.map do |visibility, methods|
method_names = methods.map do |method|
next unless method.display?
[method.name, method.file_name]
end.compact
[visibility, method_names.uniq]
end
[type, visibilities]
end
[ MARSHAL_VERSION,
@name,
full_name,
@superclass,
parse(@comment_location),
attrs,
constants.select { |constant| constant.display? },
includes.map do |incl|
next unless incl.display?
[incl.name, parse(incl.comment), incl.file_name]
end.compact,
method_types,
extends.map do |ext|
next unless ext.display?
[ext.name, parse(ext.comment), ext.file_name]
end.compact,
@sections.values,
@in_files.map do |tl|
tl.relative_name
end,
parent.full_name,
parent.class,
]
end Related methods
- Instance methods
- add_comment
- add_things
- ancestors
- aref
- aref_prefix
- clear_comment
- comment=
- complete
- direct_ancestors
- document_self_or_methods
- documented?
- each_ancestor
- find_ancestor_local_symbol
- find_class_named
- full_name
- marshal_dump
- marshal_load
- merge
- merge_collections
- merge_sections
- module?
- name=
- name_for_path
- non_aliases
- parse
- path
- remove_nodoc_children
- remove_things
- search_record
- store=
- superclass
- superclass=
- to_s
- type
- update_aliases
- update_extends
- update_includes
- Class methods
- from_module
- new