Sha256: 33b4efa20fa10d9db7748efe0ccde4c9b13b55aec752af4bd9d319a97be61b6f

Contents?: true

Size: 174 Bytes

Versions: 5

Compression:

Stored size: 174 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

5 entries across 5 versions & 1 rubygems

Version Path
attr_extras-6.2.5 lib/attr_extras/utils.rb
attr_extras-6.2.4 lib/attr_extras/utils.rb
attr_extras-6.2.3 lib/attr_extras/utils.rb
attr_extras-6.2.2 lib/attr_extras/utils.rb
attr_extras-6.2.1 lib/attr_extras/utils.rb