Class: BetaBrite::Memory::Dots

Inherits:
BetaBrite::Memory show all
Defined in:
lib/memory/memory.rb

Constant Summary

Constants inherited from BetaBrite::Memory

COMMAND_CODE, DOTS, LOCKED, STRING, TEXT, UNLOCKED

Instance Attribute Summary

Attributes inherited from BetaBrite::Memory

#label, #locked, #size, #time, #type

Instance Method Summary collapse

Methods inherited from BetaBrite::Memory

clear, #format

Constructor Details

#initialize(label, rows, columns) ⇒ Dots

Returns a new instance of Dots.



59
60
61
62
63
64
65
66
67
# File 'lib/memory/memory.rb', line 59

def initialize(label, rows, columns)
  size = sprintf("%02x", rows) << sprintf("%02x", columns)
  super(  :label  => label,
          :type   => DOTS,
          :locked => UNLOCKED,
          :size   => size,
          :time   => '4000'
       )
end