123456789_123456789_123456789_123456789_123456789_

Class: IRB::ExtendCommand::Nop

Do not use. This class is for internal use only.

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(conf) ⇒ Nop

[ GitHub ]

  
# File 'lib/irb/cmd/nop.rb', line 54

def initialize(conf)
  @irb_context = conf
end

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.

[ GitHub ]

  
# 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.message
end

.string_literal?(args) ⇒ Boolean (private)

[ GitHub ]

  
# 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