Implement stat with Ruby the simplest way