Class: EventBus

Inherits:
Object
  • Object
show all
Defined in:
lib/ls4/lib/ebus.rb

Defined Under Namespace

Modules: BusMixin, DeclarerBase, ObjectMixin, SingletonMixin Classes: Bus, CallSlot, Object, SignalSlot, Singleton, Slot, SlotError

Class Method Summary collapse

Class Method Details

.bus(&block) ⇒ Object



27
28
29
# File 'lib/ls4/lib/ebus.rb', line 27

def self.bus(&block)
	Class.new(Bus, &block)
end

.method2const(mname) ⇒ Object



129
130
131
132
133
134
135
136
# File 'lib/ls4/lib/ebus.rb', line 129

def self.method2const(mname)
	mname = mname.to_s
	mname = mname.gsub(/\?$/,   '__p')
	mname = mname.gsub(/\!$/,   '__bang')
	mname = mname.gsub(/\=$/,   '__eq')
	mname = mname.gsub(/^\[\]/, '__at')
	mname
end