Class: Pio::PortStatus::Reason
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- Pio::PortStatus::Reason
- Defined in:
- lib/pio/port_status.rb
Overview
What changed about the physical port
Constant Summary collapse
- REASONS =
{ add: 0, delete: 1, modify: 2 }
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
13 14 15 |
# File 'lib/pio/port_status.rb', line 13 def get REASONS.invert.fetch(reason) end |
#set(value) ⇒ Object
17 18 19 |
# File 'lib/pio/port_status.rb', line 17 def set(value) self.reason = REASONS.fetch(value) end |