Class: Buby::Tab Abstract

Inherits:
Object show all
Includes:
Java::Burp::ITab
Defined in:
lib/buby/tab.rb

Overview

This class is abstract.

This interface is used to provide Burp with details of a custom tab that will be added to Burp’s UI, using a method such as #addSuiteTab.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(caption = nil, component = nil) ⇒ Tab

Returns a new instance of Tab.



10
11
12
13
# File 'lib/buby/tab.rb', line 10

def initialize(caption = nil, component = nil)
  @caption = caption || self.class.name
  @component = component
end

Instance Attribute Details

#captionObject

Returns the value of attribute caption.



8
9
10
# File 'lib/buby/tab.rb', line 8

def caption
  @caption
end

#componentObject

Returns the value of attribute component.



8
9
10
# File 'lib/buby/tab.rb', line 8

def component
  @component
end

Instance Method Details

#getTabCaptionString

Burp uses this method to obtain the caption that should appear on the custom tab when it is displayed.

Returns:

  • (String)

    The caption that should appear on the custom tab when it is displayed.



21
22
23
24
# File 'lib/buby/tab.rb', line 21

def getTabCaption
  pp [:got_getTabCaption] if $DEBUG
  @caption.to_s
end

#getUiComponentjava.awt.Component

Burp uses this method to obtain the component that should be used as the contents of the custom tab when it is displayed.

Returns:

  • (java.awt.Component)

    The component that should be used as the contents of the custom tab when it is displayed.



32
33
34
35
# File 'lib/buby/tab.rb', line 32

def getUiComponent
  pp [:got_getUiComponent] if $DEBUG
  @component
end