Class: OpenHAB::Core::Types::OpenClosedType
- Inherits:
-
Object
- Object
- OpenHAB::Core::Types::OpenClosedType
- Includes:
- State
- Defined in:
- lib/openhab/core/types/open_closed_type.rb
Overview
Constant Summary collapse
- OPEN =
Open State
- CLOSED =
Closed State
Instance Method Summary collapse
-
#! ⇒ OpenClosedType
Invert the type.
-
#closed? ⇒ true, false
Check if
self == CLOSED
. -
#open? ⇒ true, false
Check if
self == OPEN
.
Methods included from Type
Instance Method Details
#! ⇒ OpenClosedType
Invert the type
29 30 31 32 33 |
# File 'lib/openhab/core/types/open_closed_type.rb', line 29 def ! return CLOSED if open? OPEN if closed? end |
#closed? ⇒ true, false
Check if self == CLOSED
|
# File 'lib/openhab/core/types/open_closed_type.rb', line 23
|
#open? ⇒ true, false
Check if self == OPEN
|
# File 'lib/openhab/core/types/open_closed_type.rb', line 19
|