Module: LiveData

Defined in:
lib/live_data.rb,
lib/live_data/user.rb,
lib/live_data/group.rb,
lib/live_data/engine.rb,
lib/live_data/channel.rb,
lib/live_data/version.rb,
lib/live_data/thread_watch.rb

Defined Under Namespace

Modules: ThreadWatch Classes: Channel, Engine, Group, User

Constant Summary collapse

Channels =
{}
VERSION =
'0.3.1'

Class Method Summary collapse

Class Method Details

.check_channel(name) ⇒ Object



41
42
43
# File 'lib/live_data.rb', line 41

def self.check_channel( name )
   Channels[name]
end

.create_channel(name) ⇒ Object



21
22
23
24
25
26
# File 'lib/live_data.rb', line 21

def self.create_channel( name )
   unless( Channels[name] )
      Channels[name] = LiveData::Channel.new( name )
   end
   return Channels[name]
end

.destroy_channel(name) ⇒ Object



28
29
30
31
# File 'lib/live_data.rb', line 28

def self.destroy_channel( name )
   channel = self.get_channel( name )
   channel.destroy()
end

.get_channel(name, create = true) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/live_data.rb', line 33

def self.get_channel( name, create = true )
   channel = Channels[name]
   if( !channel and create )
      channel = LiveData.create_channel( name )
   end
   return channel
end