Module: Tellstick::ProtocolLoader

Included in:
Nexa, PlainText, Proove, RisingSun, Waveman
Defined in:
lib/tellstick/protocol/protocol_loader.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



20
21
22
23
# File 'lib/tellstick/protocol/protocol_loader.rb', line 20

def self.included(klass)
  key = klass.name.gsub("Tellstick::","").split(/(?=[A-Z])/).map{|name| name.downcase}.join("_")
  $protocol[key] = klass
end