Sha256: ac62ac10719f802b42f4645f6f060e264a036ad01c096cf6b16cabc1e6fb3587
Contents?: true
Size: 313 Bytes
Versions: 2
Compression:
Stored size: 313 Bytes
Contents
module WhippedCream # An abstract class for controls to inherit from class Control VALID_GPIO_PINS = [4, 17, 18, 22, 23, 24, 25, 27] def id name.downcase.gsub(/[^\w]+/, '_').gsub(/^_|_$/, '').to_sym end def type self.class.to_s.split('::').last.downcase.to_sym end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
whipped-cream-0.2.0.beta1 | lib/whipped-cream/control.rb |
whipped-cream-0.1.1 | lib/whipped-cream/control.rb |