Module: TTT::Interface

Defined in:
lib/ttt/interface.rb,
lib/ttt/interface/cli.rb,
lib/ttt/interface/cli/views.rb,
lib/ttt/interface/limelight.rb,
lib/ttt/interface/cli/players.rb

Defined Under Namespace

Classes: CLI, Limelight

Class Method Summary collapse

Class Method Details

.register(name, interface) ⇒ Object



15
16
17
# File 'lib/ttt/interface.rb', line 15

def self.register(name, interface)
  registered[name] = interface
end

.registeredObject



3
4
5
# File 'lib/ttt/interface.rb', line 3

def self.registered
  @registered_interfaces ||= Hash.new
end

.registered?(name) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/ttt/interface.rb', line 7

def self.registered?(name)
  registered.has_key? name
end

.registered_namesObject



11
12
13
# File 'lib/ttt/interface.rb', line 11

def self.registered_names
  registered.keys
end