Class: Nmap::Status
- Inherits:
-
Object
- Object
- Nmap::Status
- Defined in:
- lib/nmap/status.rb
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
The reason for the state.
-
#state ⇒ Object
readonly
The state of a host.
Instance Method Summary collapse
-
#initialize(state, reason) ⇒ Status
constructor
Creates a new Status object.
-
#to_s ⇒ String
Converts the status to a String.
Constructor Details
#initialize(state, reason) ⇒ Status
Creates a new Status object.
19 20 21 22 |
# File 'lib/nmap/status.rb', line 19 def initialize(state,reason) @state = state @reason = reason end |
Instance Attribute Details
#reason ⇒ Object (readonly)
The reason for the state
8 9 10 |
# File 'lib/nmap/status.rb', line 8 def reason @reason end |
#state ⇒ Object (readonly)
The state of a host
5 6 7 |
# File 'lib/nmap/status.rb', line 5 def state @state end |
Instance Method Details
#to_s ⇒ String
Converts the status to a String.
30 31 32 |
# File 'lib/nmap/status.rb', line 30 def to_s @state.to_s end |