module MovingsignApi::PrettyKeyable

Public Class Methods

included(other) click to toggle source

@!visibility private

# File lib/movingsign_api/commands/internal/pretty_keyable.rb, line 8
def self.included(other)
  other.class_variable_set(:@@KEYS, [])
  other.class_variable_set(:@@CODES, [])

  other.extend ClassMethods
end

Public Instance Methods

to_bytes() click to toggle source

@!visibility private

# File lib/movingsign_api/commands/internal/pretty_keyable.rb, line 16
def to_bytes
  string_to_ascii_bytes self.class.codes[self.class.keys.index(self.key)]
end