Class: IRB::ExtendCommand::Nop
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
Backtrace, Break, Catch, ChangeWorkspace, Continue, CurrentWorkingWorkspace, Debug, DebugCommand, Delete, Edit, Finish, Foreground, Fork, Help, Info, IrbCommand, IrbInfo, Jobs, Kill, Load, LoaderCommand, Ls, Measure, MultiIRBCommand, Next, PopWorkspace, PushWorkspace, Require, ShowCmds, ShowSource, Source, Step, Whereami, Workspaces
|
|
Inherits: | Object |
Defined in: | lib/irb/cmd/nop.rb |
Class Method Summary
- .category(category = nil)
- .description(description = nil)
-
.execute(conf, *opts, &block)
See additional method definition at line 39.
- .new(conf) ⇒ Nop constructor
- .string_literal?(args) ⇒ Boolean private
Instance Attribute Summary
- #irb_context readonly
Instance Method Summary
Constructor Details
.new(conf) ⇒ Nop
Class Method Details
.category(category = nil)
[ GitHub ]# File 'lib/irb/cmd/nop.rb', line 20
def category(category = nil) @category = category if category @category end
.description(description = nil)
[ GitHub ]# File 'lib/irb/cmd/nop.rb', line 25
def description(description = nil) @description = description if description @description end
.execute(conf, *opts, &block)
See additional method definition at line 39.
# File 'lib/irb/cmd/nop.rb', line 46
def self.execute(conf, *opts, **kwargs, &block) command = new(conf) command.execute(*opts, **kwargs, &block) rescue CommandArgumentError => e puts e. end
.string_literal?(args) ⇒ Boolean
(private)
# File 'lib/irb/cmd/nop.rb', line 32
def string_literal?(args) sexp = Ripper.sexp(args) sexp && sexp.size == 2 && sexp.last&.first&.first == :string_literal end
Instance Attribute Details
#irb_context (readonly)
[ GitHub ]# File 'lib/irb/cmd/nop.rb', line 58
attr_reader :irb_context
Instance Method Details
#execute(*opts)
[ GitHub ]# File 'lib/irb/cmd/nop.rb', line 64
def execute(*opts) #nop end
#irb
[ GitHub ]# File 'lib/irb/cmd/nop.rb', line 60
def irb @irb_context.irb end