In Files

  • irb/extend-command.rb

IRB::ContextExtender::CE

extension support for Context

Constants

CE

extension support for Context

Public Class Methods

def_extend_command(cmd_name, load_file, *aliases) click to toggle source
 
               # File irb/extend-command.rb, line 209
def self.def_extend_command(cmd_name, load_file, *aliases)
  line = __LINE__; Context.module_eval %Q[
    def #{cmd_name}(*opts, &b)
      Context.module_eval {remove_method(:#{cmd_name})}
      require "#{load_file}"
      send :#{cmd_name}, *opts, &b
    end
    for ali in aliases
      alias_method ali, cmd_name
    end
  ], __FILE__, line
end
            
install_extend_commands() click to toggle source
 
               # File irb/extend-command.rb, line 203
def self.install_extend_commands
  for args in @EXTEND_COMMANDS
    def_extend_command(*args)
  end
end
            

Commenting is here to help enhance the documentation. For example, sample code, or clarification of the documentation.

If you are posting code samples in your comments, please wrap them in "<pre><code class="ruby" > ... </code></pre>" markup in order to get syntax highlighting.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file a bug report so that it can be corrected for the next release. Thank you.

blog comments powered by Disqus