Class: Wrnap::Package::Kinwalker

Inherits:
Base
  • Object
show all
Defined in:
lib/wrnap/package/kinwalker.rb

Defined Under Namespace

Classes: Node

Instance Attribute Summary collapse

Attributes inherited from Base

#data, #flags, #response, #runtime

Instance Method Summary collapse

Methods inherited from Base

bootstrap, #debugger, #initialize, #inspect

Methods included from Global::Yaml

#deserialize, #serialize

Methods included from Global::Chainer

included

Methods included from Global::Runner

included

Constructor Details

This class inherits a constructor from Wrnap::Package::Base

Instance Attribute Details

#nodesObject (readonly)

Returns the value of attribute nodes.



5
6
7
# File 'lib/wrnap/package/kinwalker.rb', line 5

def nodes
  @nodes
end

Instance Method Details

#mfptObject



11
12
13
# File 'lib/wrnap/package/kinwalker.rb', line 11

def mfpt
  nodes.last.time
end

#post_processObject



7
8
9
# File 'lib/wrnap/package/kinwalker.rb', line 7

def post_process
  @nodes = response.split("TRAJECTORY").last.split(?\n).reject(&:empty?)[0..-2].map { |line| Node.new(*line.split(/\s+/)) }
end