Class: Pult::Panel

Inherits:
Hash
  • Object
show all
Defined in:
lib/pult/panel.rb,
lib/init/struct.rb

Defined Under Namespace

Modules: App, DotAccessible, Executor, Injector, Provider, Runner

Constant Summary collapse

SYS_KEYS =
%w{ config }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auto: true) ⇒ Panel

Returns a new instance of Panel.



8
9
10
11
12
13
# File 'lib/pult/panel.rb', line 8

def initialize auto: true
  @_file  = Provider::Pult::FILE
  @_root  = Pult::ROOT

  init! if auto && allow_init?
end

Instance Attribute Details

#_fileObject

Returns the value of attribute _file.



6
7
8
# File 'lib/pult/panel.rb', line 6

def _file
  @_file
end

#_rootObject

Returns the value of attribute _root.



5
6
7
# File 'lib/pult/panel.rb', line 5

def _root
  @_root
end

Instance Method Details

#init!Object



15
16
17
18
# File 'lib/pult/panel.rb', line 15

def init!
  allow_init? ? \
    to_panel! : raise(StandardError, 'Init is not allowed!')
end