Class: IRB::Command::Base
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
Backtrace, Break, Catch, ChangeWorkspace, Context, Continue, CurrentWorkingWorkspace, Debug, DebugCommand, Delete, DisableIrb, Edit, Exit, Finish, ForceExit, Foreground, Help, History, Info, IrbCommand, IrbInfo, Jobs, Kill, Load, LoaderCommand, Ls, Measure, MultiIRBCommand, Next, PopWorkspace, PushWorkspace, Require, ShowDoc, ShowSource, Source, Step, Whereami, Workspaces
|
|
Inherits: | Object |
Defined in: | lib/irb/command/base.rb |
Class Method Summary
Instance Attribute Summary
- #irb_context readonly
Instance Method Summary
Constructor Details
.new(irb_context) ⇒ Base
# File 'lib/irb/command/base.rb', line 47
def initialize(irb_context) @irb_context = irb_context end
Class Method Details
.category(category = nil)
[ GitHub ]# File 'lib/irb/command/base.rb', line 19
def category(category = nil) @category = category if category @category || "No category" end
.description(description = nil)
[ GitHub ]# File 'lib/irb/command/base.rb', line 24
def description(description = nil) @description = description if description @description || "No description provided." end
.execute(irb_context, arg)
[ GitHub ]# File 'lib/irb/command/base.rb', line 41
def self.execute(irb_context, arg) new(irb_context).execute(arg) rescue CommandArgumentError => e puts e. end
.help_message(help_message = nil)
[ GitHub ]# File 'lib/irb/command/base.rb', line 29
def ( = nil) @help_message = if @help_message end
.highlight(text) (private)
[ GitHub ]Instance Attribute Details
#irb_context (readonly)
[ GitHub ]# File 'lib/irb/command/base.rb', line 51
attr_reader :irb_context
Instance Method Details
#execute(arg)
[ GitHub ]# File 'lib/irb/command/base.rb', line 53
def execute(arg) #nop end