Module | MethodSource |
In: |
lib/method_source.rb
lib/method_source/code_helpers.rb lib/method_source/version.rb lib/method_source/source_location.rb |
VERSION | = | "0.8" |
Helper method responsible for opening source file and buffering up the comments for a specified method. Defined here to avoid polluting `Method` class. @param [Array] source_location The array returned by Method#source_location @param [String] method_name @return [String] The comments up to the point of the method.
Load a memoized copy of the lines in a file.
@param [String] file_name @param [String] method_name @return [Array<String>] the contents of the file @raise [SourceNotFoundError]
Helper method responsible for extracting method body. Defined here to avoid polluting `Method` class. @param [Array] source_location The array returned by Method#source_location @param [String] method_name @return [String] The method body