Sha256: 5ceff449232b45a71e7b3c7d1ec099fe92e392c5cd8a2b439476ebeda171912e

Contents?: true

Size: 418 Bytes

Versions: 4

Compression:

Stored size: 418 Bytes

Contents

module Memorable

    module InstanceMethods
    
        def save
            self.class.all << self
        end

    end

    module ClassMethods

        def destroy_all
            self.all.clear
        end

        def count
            self.all.count 
        end

        def create(attributes)
            instance = self.new(attributes)
            instance.save
            instance
        end

    end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
podcast-book-club-1.0.3 lib/podcast_book_club/concerns/memorable.rb
podcast-book-club-1.0.2 lib/podcast_book_club/concerns/memorable.rb
podcast-book-club-1.0.1 lib/podcast_book_club/concerns/memorable.rb
podcast-book-club-1.0.0 lib/podcast_book_club/concerns/memorable.rb