class Pult::Panel
Constants
- SYS_KEYS
Attributes
_file[RW]
_root[RW]
Public Class Methods
new(auto: true)
click to toggle source
# File lib/pult/panel.rb, line 8 def initialize auto: true @_file = Provider::Pult::FILE @_root = Pult::ROOT init! if auto && allow_init? end
Public Instance Methods
init!()
click to toggle source
# File lib/pult/panel.rb, line 15 def init! allow_init? ? \ to_panel! : raise(StandardError, 'Init is not allowed!') end
Private Instance Methods
allow_init?()
click to toggle source
# File lib/pult/panel.rb, line 34 def allow_init? true_abs_path?(@_file) || (!!@_root && !!@_file) end
to_panel!()
click to toggle source
# File lib/pult/panel.rb, line 22 def to_panel! class_eval { include DotAccessible } Provider::Pult.mixin! self Provider::Rake.mixin! self Provider::Service.mixin! self Injector.inject! self App.make_apps! self end
true_abs_path?(path)
click to toggle source
# File lib/pult/panel.rb, line 38 def true_abs_path? path path[0] == '/' && File.exists(path) end