Class: Tina4::PortTakeover::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/tina4/port_takeover.rb

Overview

What a takeover attempt did, so each caller can react in its own idiom.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#killedObject

Returns the value of attribute killed

Returns:

  • (Object)

    the current value of killed



38
39
40
# File 'lib/tina4/port_takeover.rb', line 38

def killed
  @killed
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



38
39
40
# File 'lib/tina4/port_takeover.rb', line 38

def message
  @message
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



38
39
40
# File 'lib/tina4/port_takeover.rb', line 38

def port
  @port
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



38
39
40
# File 'lib/tina4/port_takeover.rb', line 38

def status
  @status
end

Instance Method Details

#reclaimed?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/tina4/port_takeover.rb', line 39

def reclaimed?
  status == KILLED
end

#refused?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/tina4/port_takeover.rb', line 43

def refused?
  REFUSALS.include?(status)
end