Module: ErpApp::Config

Defined in:
lib/erp_app/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.max_js_loader_order_indexObject

Returns the value of attribute max_js_loader_order_index.



4
5
6
# File 'lib/erp_app/config.rb', line 4

def max_js_loader_order_index
  @max_js_loader_order_index
end

.session_redirect_afterObject

Returns the value of attribute session_redirect_after.



4
5
6
# File 'lib/erp_app/config.rb', line 4

def session_redirect_after
  @session_redirect_after
end

.session_warn_afterObject

Returns the value of attribute session_warn_after.



4
5
6
# File 'lib/erp_app/config.rb', line 4

def session_warn_after
  @session_warn_after
end

.shared_css_assetsObject

Returns the value of attribute shared_css_assets.



4
5
6
# File 'lib/erp_app/config.rb', line 4

def shared_css_assets
  @shared_css_assets
end

.shared_js_assetsObject

Returns the value of attribute shared_js_assets.



4
5
6
# File 'lib/erp_app/config.rb', line 4

def shared_js_assets
  @shared_js_assets
end

.widgetsObject

Returns the value of attribute widgets.



4
5
6
# File 'lib/erp_app/config.rb', line 4

def widgets
  @widgets
end

Class Method Details

.configure(&blk) ⇒ Object



26
27
28
# File 'lib/erp_app/config.rb', line 26

def configure(&blk)
  @configure_blk = blk
end

.configure!Object



30
31
32
# File 'lib/erp_app/config.rb', line 30

def configure!
  @configure_blk.call(self) if @configure_blk
end

.init!Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/erp_app/config.rb', line 9

def init!
  @defaults = {
      :@widgets => [],
      :@shared_js_assets => [],
      :@shared_css_assets => [],
      :@session_warn_after => 60, #in minutes
      :@session_redirect_after => 90,#in minutes
      :@max_js_loader_order_index => 9999 # max loader order index for a js file
  }
end

.reset!Object



20
21
22
23
24
# File 'lib/erp_app/config.rb', line 20

def reset!
  @defaults.each do |k, v|
    instance_variable_set(k, v)
  end
end