Sha256: 4b74a4974bcc0c030807c7ee6e403c0b1b3ff5037c6c565b5ec0fa252575969b
Contents?: true
Size: 361 Bytes
Versions: 10
Compression:
Stored size: 361 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 end
Version data entries
10 entries across 10 versions & 1 rubygems