Class: MovingsignApi::DisplayMode
- Inherits:
-
Object
- Object
- MovingsignApi::DisplayMode
- Includes:
- PrettyKeyable
- Defined in:
- lib/movingsign_api/commands/internal/display_mode.rb
Overview
Text display mode setting.
Display Mode Constants collapse
-
#auto ⇒ Symbol
readonly
Display mode auto (protocol display mode ‘A’).
-
#clock ⇒ Symbol
readonly
Display mode clock (protocol display mode ‘Z’).
-
#cyclecolor ⇒ Symbol
readonly
Display mode cyclecolor (protocol display mode ‘Y’).
-
#flash ⇒ Symbol
readonly
Display mode flash (protocol display mode ‘B’).
-
#hold ⇒ Symbol
readonly
Display mode hold (protocol display mode ‘C’).
-
#interlock ⇒ Symbol
readonly
Display mode interlock (protocol display mode ‘D’).
-
#rolldown ⇒ Symbol
readonly
Display mode rolldown (protocol display mode ‘E’).
-
#rollin ⇒ Symbol
readonly
Display mode rollin (protocol display mode ‘G’).
-
#rollleft ⇒ Symbol
readonly
Display mode rollleft (protocol display mode ‘I’).
-
#rollout ⇒ Symbol
readonly
Display mode rollout (protocol display mode ‘H’).
-
#rollright ⇒ Symbol
readonly
Display mode rollright (protocol display mode ‘J’).
-
#rollup ⇒ Symbol
readonly
Display mode rollup (protocol display mode ‘F’).
-
#rotate ⇒ Symbol
readonly
Display mode rotate (protocol display mode ‘K’).
-
#slide ⇒ Symbol
readonly
Display mode slide (protocol display mode ‘L’).
-
#snow ⇒ Symbol
readonly
Display mode snow (protocol display mode ‘M’).
-
#sparkle ⇒ Symbol
readonly
Display mode sparkle (protocol display mode ‘N’).
-
#spray ⇒ Symbol
readonly
Display mode spray (protocol display mode ‘O’).
-
#starburst ⇒ Symbol
readonly
Display mode starburst (protocol display mode ‘P’).
-
#switch ⇒ Symbol
readonly
Display mode switch (protocol display mode ‘Q’).
-
#twinkle ⇒ Symbol
readonly
Display mode twinkle (protocol display mode ‘R’).
-
#wipedown ⇒ Symbol
readonly
Display mode wipedown (protocol display mode ‘S’).
-
#wipein ⇒ Symbol
readonly
Display mode wipein (protocol display mode ‘U’).
-
#wipeleft ⇒ Symbol
readonly
Display mode wipeleft (protocol display mode ‘W’).
-
#wipeout ⇒ Symbol
readonly
Display mode wipeout (protocol display mode ‘V’).
-
#wiperight ⇒ Symbol
readonly
Display mode wiperight (protocol display mode ‘X’).
-
#wipeup ⇒ Symbol
readonly
Display mode wipeup (protocol display mode ‘T’).
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(mode) ⇒ DisplayMode
constructor
A new instance of DisplayMode.
Constructor Details
#initialize(mode) ⇒ DisplayMode
Returns a new instance of DisplayMode.
49 50 51 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 49 def initialize(mode) @key = mode end |
Instance Attribute Details
#auto ⇒ Symbol (readonly)
Display mode auto (protocol display mode ‘A’)
18 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 18 display_mode :auto, 'A' |
#clock ⇒ Symbol (readonly)
Display mode clock (protocol display mode ‘Z’)
43 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 43 display_mode :clock, 'Z' |
#cyclecolor ⇒ Symbol (readonly)
Display mode cyclecolor (protocol display mode ‘Y’)
42 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 42 display_mode :cyclecolor, 'Y' |
#flash ⇒ Symbol (readonly)
Display mode flash (protocol display mode ‘B’)
19 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 19 display_mode :flash, 'B' |
#hold ⇒ Symbol (readonly)
Display mode hold (protocol display mode ‘C’)
20 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 20 display_mode :hold, 'C' |
#interlock ⇒ Symbol (readonly)
Display mode interlock (protocol display mode ‘D’)
21 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 21 display_mode :interlock, 'D' |
#key ⇒ Symbol
47 48 49 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 47 def key @key end |
#rolldown ⇒ Symbol (readonly)
Display mode rolldown (protocol display mode ‘E’)
22 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 22 display_mode :rolldown, 'E' |
#rollin ⇒ Symbol (readonly)
Display mode rollin (protocol display mode ‘G’)
24 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 24 display_mode :rollin, 'G' |
#rollleft ⇒ Symbol (readonly)
Display mode rollleft (protocol display mode ‘I’)
26 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 26 display_mode :rollleft, 'I' |
#rollout ⇒ Symbol (readonly)
Display mode rollout (protocol display mode ‘H’)
25 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 25 display_mode :rollout, 'H' |
#rollright ⇒ Symbol (readonly)
Display mode rollright (protocol display mode ‘J’)
27 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 27 display_mode :rollright, 'J' |
#rollup ⇒ Symbol (readonly)
Display mode rollup (protocol display mode ‘F’)
23 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 23 display_mode :rollup, 'F' |
#rotate ⇒ Symbol (readonly)
Display mode rotate (protocol display mode ‘K’)
28 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 28 display_mode :rotate, 'K' |
#slide ⇒ Symbol (readonly)
Display mode slide (protocol display mode ‘L’)
29 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 29 display_mode :slide, 'L' |
#snow ⇒ Symbol (readonly)
Display mode snow (protocol display mode ‘M’)
30 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 30 display_mode :snow, 'M' |
#sparkle ⇒ Symbol (readonly)
Display mode sparkle (protocol display mode ‘N’)
31 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 31 display_mode :sparkle, 'N' |
#spray ⇒ Symbol (readonly)
Display mode spray (protocol display mode ‘O’)
32 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 32 display_mode :spray, 'O' |
#starburst ⇒ Symbol (readonly)
Display mode starburst (protocol display mode ‘P’)
33 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 33 display_mode :starburst, 'P' |
#switch ⇒ Symbol (readonly)
Display mode switch (protocol display mode ‘Q’)
34 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 34 display_mode :switch, 'Q' |
#twinkle ⇒ Symbol (readonly)
Display mode twinkle (protocol display mode ‘R’)
35 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 35 display_mode :twinkle, 'R' |
#wipedown ⇒ Symbol (readonly)
Display mode wipedown (protocol display mode ‘S’)
36 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 36 display_mode :wipedown, 'S' |
#wipein ⇒ Symbol (readonly)
Display mode wipein (protocol display mode ‘U’)
38 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 38 display_mode :wipein, 'U' |
#wipeleft ⇒ Symbol (readonly)
Display mode wipeleft (protocol display mode ‘W’)
40 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 40 display_mode :wipeleft, 'W' |
#wipeout ⇒ Symbol (readonly)
Display mode wipeout (protocol display mode ‘V’)
39 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 39 display_mode :wipeout, 'V' |
#wiperight ⇒ Symbol (readonly)
Display mode wiperight (protocol display mode ‘X’)
41 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 41 display_mode :wiperight, 'X' |
#wipeup ⇒ Symbol (readonly)
Display mode wipeup (protocol display mode ‘T’)
37 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 37 display_mode :wipeup, 'T' |
Class Method Details
.parse(input) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/movingsign_api/commands/internal/display_mode.rb', line 53 def self.parse(input) if key = parse_to_key(input) self.new key else raise InvalidInputError, "Display mode '#{input}' is not valid." end end |