Class: IRB::ExtendCommand::Nop

Inherits:
Object
  • Object
show all
Defined in:
lib/irb/cmd/nop.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conf) ⇒ Nop

Returns a new instance of Nop.



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

def initialize(conf)
  @irb_context = conf
end

Instance Attribute Details

#irb_contextObject (readonly)

Returns the value of attribute irb_context.



58
59
60
# File 'lib/irb/cmd/nop.rb', line 58

def irb_context
  @irb_context
end

Class Method Details

.category(category = nil) ⇒ Object



20
21
22
23
# File 'lib/irb/cmd/nop.rb', line 20

def category(category = nil)
  @category = category if category
  @category
end

.description(description = nil) ⇒ Object



25
26
27
28
# File 'lib/irb/cmd/nop.rb', line 25

def description(description = nil)
  @description = description if description
  @description
end

.execute(conf, *opts, &block) ⇒ Object



39
40
41
42
43
44
# File 'lib/irb/cmd/nop.rb', line 39

def self.execute(conf, *opts, **kwargs, &block)
  command = new(conf)
  command.execute(*opts, **kwargs, &block)
rescue CommandArgumentError => e
  puts e.message
end

Instance Method Details

#execute(*opts) ⇒ Object



64
65
66
# File 'lib/irb/cmd/nop.rb', line 64

def execute(*opts)
  #nop
end

#irbObject



60
61
62
# File 'lib/irb/cmd/nop.rb', line 60

def irb
  @irb_context.irb
end