List of all supported languages. @return [Hash]
@return [Symbol] The type of code stored in this wrapper.
@param [String] filename The name of a file with code to be detected @param [Symbol] #code_type The type of code the `filename` contains
# File lib/pry/code/code_file.rb, line 29 def initialize(filename, code_type = type_from_filename(filename)) @filename = filename @code_type = code_type end
@return [String] The code contained in the current `@filename`.
# File lib/pry/code/code_file.rb, line 35 def code if @filename == Pry.eval_path Pry.line_buffer.drop(1) elsif Pry::Method::Patcher.code_for(@filename) Pry::Method::Patcher.code_for(@filename) elsif RbxPath.is_core_path?(@filename) File.read(RbxPath.convert_path_to_full(@filename)) else path = abs_path @code_type = type_from_filename(path) File.read(path) end end