Module: Pra::WindowSystemFactory

Defined in:
lib/pra/window_system_factory.rb

Defined Under Namespace

Classes: UnknownWindowSystemId

Class Method Summary collapse

Class Method Details

.build(window_system_id) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/pra/window_system_factory.rb', line 7

def self.build(window_system_id)
  case window_system_id
  when 'curses'
    return Pra::CursesWindowSystem.new
  else
    raise Pra::WindowSystemFactory::UnknownWindowSystemId, ".build() doesn't know about a windows system identified by '#{window_system_id}'"
  end
end