Class: Mu::Xtractr::About

Inherits:
Object
  • Object
show all
Defined in:
lib/mu/xtractr/about.rb

Overview

xtractr.about.packets

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ About

:nodoc:



43
44
45
46
47
48
49
50
# File 'lib/mu/xtractr/about.rb', line 43

def initialize json # :nodoc:
    @version  = json['version']
    @packets  = json['packets']
    @flows    = json['flows']
    @hosts    = json['hosts']
    @services = json['services']
    @duration = json['duration']
end

Instance Attribute Details

#durationObject (readonly)

Returns the total duration of all the pcaps in the index



41
42
43
# File 'lib/mu/xtractr/about.rb', line 41

def duration
  @duration
end

#flowsObject (readonly)

Returns the ##flows in the index



32
33
34
# File 'lib/mu/xtractr/about.rb', line 32

def flows
  @flows
end

#hostsObject (readonly)

Returns the ##hosts in the index



35
36
37
# File 'lib/mu/xtractr/about.rb', line 35

def hosts
  @hosts
end

#packetsObject (readonly)

Returns the ##packets in the index



29
30
31
# File 'lib/mu/xtractr/about.rb', line 29

def packets
  @packets
end

#servicesObject (readonly)

Returns the ##services in the index



38
39
40
# File 'lib/mu/xtractr/about.rb', line 38

def services
  @services
end

#versionObject (readonly)

Returns the version of the xtractr server



26
27
28
# File 'lib/mu/xtractr/about.rb', line 26

def version
  @version
end

Instance Method Details

#inspectObject

:nodoc:



52
53
54
# File 'lib/mu/xtractr/about.rb', line 52

def inspect # :nodoc:
    "#<about \##{flows} flows, \##{packets} packets>"
end