Class: RBGL::GUI::BackendFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/rbgl/gui/backend_factory.rb

Constant Summary collapse

AUTO_BACKEND_ERRORS =
[LoadError, SystemCallError, BackendUnavailable].freeze

Class Method Summary collapse

Class Method Details

.build(backend, width:, height:, title:, platform: RUBY_PLATFORM, env: ENV, **options) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rbgl/gui/backend_factory.rb', line 9

def build(backend, width:, height:, title:, platform: RUBY_PLATFORM, env: ENV, **options)
  case backend
  when :auto
    build_auto_backend(
      width: width,
      height: height,
      title: title,
      platform: platform,
      env: env,
      **options
    )
  else
    build_specific_backend(backend, width: width, height: height, title: title, env: env, **options)
  end
end