lib/lorj_meta.rb
# Lorj::defaults exposes the application defaults and Config Lorj metadata.
#
# You can set the Application layer of meta data, replacing load from
# defaults.yaml
#
# * *Args*
#   - data : Optionnal initialized Application layer meta data.
:defaults exposes the application defaults and Config Lorj metadata.
You can set the Application layer of meta data, replacing load from
defaults.yaml

*Args
data : Optionnal initialized Application layer meta data.
: defaults exposes the application defaults and Config Lorj metadata . You can set the Application layer of meta data replacing load from defaults . yaml * Args data : Optionnal initialized Application layer meta data .
def data(data = nil)
    return @metadata unless @metadata.nil?
    unless data.is_a?(Hash)
      data = {}
      if Lorj.defaults.data.key?(:setup)
        data[:setup] = Lorj.defaults.data[:setup]
        Lorj.defaults.data.delete(:setup)
      end
      if Lorj.defaults.data.key?(:sections)
        data[:sections] = Lorj.defaults.data[:sections]
        Lorj.defaults.data.delete(:sections)
      end
    end
    @metadata = Lorj::MetaAppConfig.new data
    @metadata
  end
def data ( data = nil ) return @metadata unless @metadata . nil? unless data . is_a? ( Hash ) data = { } if Lorj . defaults . data . key? ( :setup ) data [ :setup ] = Lorj . defaults . data [ :setup ] Lorj . defaults . data . delete ( :setup ) end if Lorj . defaults . data . key? ( :sections ) data [ :sections ] = Lorj . defaults . data [ :sections ] Lorj . defaults . data . delete ( :sections ) end end @metadata = Lorj :: MetaAppConfig . new data @metadata end
Lorj::defaults exposes the application defaults and Config Lorj metadata.
Lorj :: defaults exposes the application defaults and Config Lorj metadata .
# TODO: Replace load from defaults.yaml to a dedicated meta file def.
data
<not_specific>