Sha256: 2f705fd1828f77f3bdbd97698e153eee7c04578d49bd62d64d6c04b8656a5df5
Contents?: true
Size: 345 Bytes
Versions: 2
Compression:
Stored size: 345 Bytes
Contents
module ObjectTable::Util def self.apply_block(object, block) if block.arity == 0 object.instance_eval(&block) else block.call(object) end end def self.get_rows(table, columns) columns.map{|n| table[n].to_a}.transpose end def self.group_indices(keys) keys.length.times.group_by{|i| keys[i]} end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
object_table-0.4.1 | lib/object_table/util.rb |
object_table-0.4.0 | lib/object_table/util.rb |