Sha256: 77c24955cebbe29815b0a7ca3d9cac3a9bac90c1f62204a4efdac8402ed84a3f
Contents?: true
Size: 361 Bytes
Versions: 7
Compression:
Stored size: 361 Bytes
Contents
class Post < OpenStruct def self.create!(attributes) create(attributes) end def self.create(attributes) @all ||= [] post = new(attributes) @all << post post.id = @all.index(post) attributes['id'] = @all.index(post) attributes end def self.all @all ||= [] @all end def self.delete_all @all = [] end end
Version data entries
7 entries across 7 versions & 1 rubygems