Method: RDoc::Attr#marshal_load
- Defined in:
- lib/rdoc/code_object/attr.rb
#marshal_load(array) ⇒ Object
Loads this Attr from array
. For a loaded Attr the following methods will return cached values:
-
#full_name
-
#parent_name
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/rdoc/code_object/attr.rb', line 124 def marshal_load array initialize_visibility @aliases = [] @parent = nil @parent_name = nil @parent_class = nil @section = nil @file = nil version = array[0] @name = array[1] @full_name = array[2] @rw = array[3] @visibility = array[4] @comment = array[5] @singleton = array[6] || false # MARSHAL_VERSION == 0 # 7 handled below @parent_name = array[8] @parent_class = array[9] @section_title = array[10] @file = RDoc::TopLevel.new array[7] if version > 1 @parent_name ||= @full_name.split('#', 2).first end |