class Object
Public Instance Methods
Source
# File lib/irbtools/libraries.rb, line 59 def code(object = self, method_name) Code.for(object, method_name) end
Source
# File lib/irbtools/libraries.rb, line 66 def colorize(string) puts CodeRay.scan( string, :ruby ).term end
…a string
Source
# File lib/irbtools/libraries.rb, line 78 def copy(str) Clipboard.copy(str) end
copies the clipboard
Source
# File lib/irbtools/libraries.rb, line 88 def copy_output copy context.instance_variable_get(:@eval_history_values).inspect.gsub(/^\d+ (.*)/, '\1') "The session output history has been copied to the clipboard." end
copies the output of all irb commands in this irb session
Source
# File lib/irbtools/libraries.rb, line 97 def mf(*args, &block) args.empty? ? MethodFinder : MethodFinder.find(*args, &block) end
Source
# File lib/irbtools/hirb.rb, line 13 def output_value(_ = false) Hirb::View.view_or_page_output(@context.last_value) || non_hirb_view_output end
Source
# File lib/irbtools/hirb.rb, line 6 def page(what, options = {}) Hirb::Pager.command_pager(what, options = {}) end
Source
# File lib/irbtools/libraries.rb, line 83 def paste Clipboard.paste end
pastes the clipboard
Source
# File lib/irbtools/libraries.rb, line 71 def ray(path) print CodeRay.scan( File.read(path), :ruby ).term end
…a file