Sha256: 618d887f1a09ed2616e98a98032d7a669b4834b5ffdaeaa28de7e81f6ccd21ca
Contents?: true
Size: 410 Bytes
Versions: 11
Compression:
Stored size: 410 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 like?(other) to_s == other.to_s end end
Version data entries
11 entries across 11 versions & 1 rubygems