lib/ury_rapid/baps/requests/handlers/playback.rb
# Converts a state change to a BAPS command code
#
# @api private
#
# @param from [Symbol] The Rapid state from which we are switching.
# @param to [Symbol] The Rapid state to which we are switching.
#
# @return [Integer] The BAPS command code that must be sent to effect
#   the state change.
Converts a state change to a BAPS command code
Converts a state change to a BAPS command code
def code_for_state(from, to)
            from = from.intern
            to = to.intern
            [from, to].each(&method(:validate_play_state))
            CODES[from][to]
          end
def code_for_state ( from , to ) from = from . intern to = to . intern [ from , to ] . each ( & method ( :validate_play_state ) ) CODES [ from ] [ to ] end
Converts a state change to a BAPS command code
Converts a state change to a BAPS command code
# Convert these to symbols, if they are currently strings.
The BAPS command code that must be sent to effect the state change.
The BAPS command code that must be sent to effect the state change .
Integer
from
The Rapid state from which we are switching.
The Rapid state from which we are switching .
to
The Rapid state to which we are switching.
The Rapid state to which we are switching .
api
None