Class: TimeBuffer::OsaScriptAppBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/time_buffer/osa_script_app_builder.rb

Constant Summary collapse

REGISTRY =
{}

Class Method Summary collapse

Class Method Details

.build(app_bundle_id) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/time_buffer/osa_script_app_builder.rb', line 12

def build(app_bundle_id)
  app_class = REGISTRY[app_bundle_id]

  if app_class.nil?
    OsaScriptApp.new(app_bundle_id)
  else
    app_class.new(app_bundle_id)
  end
end

.register(app_bundle_id:, app_class:) ⇒ Object



8
9
10
# File 'lib/time_buffer/osa_script_app_builder.rb', line 8

def register(app_bundle_id:, app_class:)
  REGISTRY[app_bundle_id] = app_class
end