Sha256: 45624a7190394867a0add1c0aa2d6b2e076283ecaaa110b646435a742b4f26ec
Contents?: true
Size: 181 Bytes
Versions: 2
Compression:
Stored size: 181 Bytes
Contents
module AttrExtras::Utils def self.flat_names(names) names .flatten .flat_map { |x| x.is_a?(Hash) ? x.keys : x } .map { |x| x.to_s.sub(/!\z/, "") } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
attr_extras-7.1.0 | lib/attr_extras/utils.rb |
attr_extras-7.0.0 | lib/attr_extras/utils.rb |