Sha256: c4c21cbe2d5cb952ce7369612eb8775b44b6b4c6a4326a1dd685044a3bd65ebb
Contents?: true
Size: 556 Bytes
Versions: 1
Compression:
Stored size: 556 Bytes
Contents
# frozen_string_literal: true class Shoes module Common module Registration def apps @apps ||= [] @apps.dup end def register(app) register_main_app app apps && @apps << app end def unregister(app) apps && @apps.delete(app) end def unregister_all @main_app = nil @apps = [] end attr_reader :main_app # Registers the first app as the main app def register_main_app(app) @main_app ||= app end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shoes-core-4.0.0.rc1 | lib/shoes/common/registration.rb |