Module: Memorable::ClassMethods
Instance Method Summary collapse
Instance Method Details
#count ⇒ Object
17 18 19 |
# File 'lib/podcast_book_club/concerns/memorable.rb', line 17 def count self.all.count end |
#create(attributes) ⇒ Object
21 22 23 24 25 |
# File 'lib/podcast_book_club/concerns/memorable.rb', line 21 def create(attributes) instance = self.new(attributes) instance.save instance end |
#destroy_all ⇒ Object
13 14 15 |
# File 'lib/podcast_book_club/concerns/memorable.rb', line 13 def destroy_all self.all.clear end |