class MultiMovingsign::Sign

Represents an individual Movingsign LED sign being driven

Attributes

path[RW]

Public Class Methods

load(hash) click to toggle source
# File lib/multi_movingsign/sign.rb, line 13
def self.load(hash)
  path = hash['path'] || (raise InvalidInputError, "path key not specified")

  self.new path
end
new(path) click to toggle source
# File lib/multi_movingsign/sign.rb, line 9
def initialize(path)
  self.path = path
end

Public Instance Methods

set_sound(on) click to toggle source
# File lib/multi_movingsign/sign.rb, line 23
def set_sound(on)
  sign.set_sound on
end
show_text(text, options = {}) click to toggle source
# File lib/multi_movingsign/sign.rb, line 19
def show_text(text, options = {})
  sign.show_text text, options
end
to_hash() click to toggle source
# File lib/multi_movingsign/sign.rb, line 27
def to_hash
  {'path' => self.path}
end

Private Instance Methods

sign() click to toggle source
# File lib/multi_movingsign/sign.rb, line 33
def sign
  MovingsignApi::Sign.new self.path
end