Sha256: 8402f6a6c24238efa9dfa679773a7fceca9b59e8d12ca7b1f99164a36572b4a0
Contents?: true
Size: 412 Bytes
Versions: 10
Compression:
Stored size: 412 Bytes
Contents
class Object def ensure_present!(*args) raise 'arguments must be non null' if args.any?(&:blank?) end def to_stringified_h to_h.stringify_keys end def defaulting(value) if block_given? && !nil? result = yield self else result = self end result || value end def struct(hash = {}) hash.to_struct end def filled? self == false || present? end end
Version data entries
10 entries across 10 versions & 2 rubygems