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(irb_context) ⇒ Nop

Returns a new instance of Nop.



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

def initialize(irb_context)
  @irb_context = irb_context
end

Instance Attribute Details

#irb_contextObject (readonly)

Returns the value of attribute irb_context.



44
45
46
# File 'lib/irb/cmd/nop.rb', line 44

def irb_context
  @irb_context
end

Class Method Details

.category(category = nil) ⇒ Object



15
16
17
18
# File 'lib/irb/cmd/nop.rb', line 15

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

.description(description = nil) ⇒ Object



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

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

.execute(irb_context, *opts, **kwargs, &block) ⇒ Object



33
34
35
36
37
38
# File 'lib/irb/cmd/nop.rb', line 33

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

Instance Method Details

#execute(*opts) ⇒ Object



46
47
48
# File 'lib/irb/cmd/nop.rb', line 46

def execute(*opts)
  #nop
end