Module: Nenv::Environment::Loader

Defined in:
lib/nenv/environment/loader.rb

Defined Under Namespace

Modules: Default, Predicate

Class Method Summary collapse

Class Method Details

.setup(meth, &callback) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/nenv/environment/loader.rb', line 7

def self.setup(meth, &callback)
  if callback
    callback
  else
    if meth.to_s.end_with? '?'
      Predicate
    else
      Default
    end
  end
end