Class: MovingsignApi::DisplayPause

Inherits:
Object
  • Object
show all
Includes:
Utilities
Defined in:
lib/movingsign_api/commands/internal/display_pause.rb

Overview

Text display pause setting (in seconds, 0 - 9)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(seconds) ⇒ DisplayPause

Returns a new instance of DisplayPause.

Parameters:

  • seconds (Integer)

    Time to pause (in seconds) (0 - 9)



13
14
15
# File 'lib/movingsign_api/commands/internal/display_pause.rb', line 13

def initialize(seconds)
  @seconds = parse_seconds(seconds)
end

Instance Attribute Details

#secondsInteger

Returns seconds.

Returns:

  • (Integer)

    seconds



10
11
12
# File 'lib/movingsign_api/commands/internal/display_pause.rb', line 10

def seconds
  @seconds
end

Instance Method Details

#to_bytesObject



17
18
19
# File 'lib/movingsign_api/commands/internal/display_pause.rb', line 17

def to_bytes
  string_to_ascii_bytes self.seconds
end