Module: Babl::Operators::Nullable::DSL

Included in:
Template
Defined in:
lib/babl/operators/nullable.rb

Instance Method Summary collapse

Instance Method Details

#nullableObject

Nullify the current construction if the current element is Nil.



7
8
9
10
11
12
# File 'lib/babl/operators/nullable.rb', line 7

def nullable
    switch(
        unscoped.nav(&:nil?) => nil,
        unscoped.default => unscoped.continue
    )
end