Method: AlphaSign#write
- Defined in:
- lib/alphasign.rb
#write(msg, opts = { }) ⇒ Object
This is for writing “txt” files
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/alphasign.rb', line 50 def write (msg, opts={ }) # default to middle position opts[:position]=:middle unless opts[:position] #default to static display opts[:mode]=:hold unless opts[:mode] # sign file to write to, carefule these need to be setup before # they can be written to... opts[:filename]=:default unless opts [:filename] raise ArgumentError.new(":filename must be a preconfigured as a txt file in momory")unless @files[opts[:filename]].type == :txt @format = StartMode + Position[opts[:position]] + Mode[opts[:mode]] rawwrite StartCMD[:wtxt]+ @files[opts[:filename]].label + @format + msg end |