Sha256: 4a9240dff45542f49e4541f7146838ca9eb9fbe3f71637662abcd85537d2898b

Contents?: true

Size: 719 Bytes

Versions: 4

Compression:

Stored size: 719 Bytes

Contents

module SportDb

  class Deleter
    ######
    # NB: make models available in sportdb module by default with namespace
    #  e.g. lets you use Team instead of Models::Team 
    include SportDb::Models

    def run
      # for now delete all tables
      
      Goal.delete_all

      Game.delete_all
      Event.delete_all
      EventTeam.delete_all
      Group.delete_all
      GroupTeam.delete_all
      Round.delete_all
      Badge.delete_all
      
      Race.delete_all
      Roster.delete_all

      Track.delete_all
      Person.delete_all
      Team.delete_all
      
      League.delete_all
      Season.delete_all
    end
    
  end # class Deleter
  
end # module SportDb

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sportdb-1.6.10 lib/sportdb/deleter.rb
sportdb-1.6.9 lib/sportdb/deleter.rb
sportdb-1.6.8 lib/sportdb/deleter.rb
sportdb-1.6.7 lib/sportdb/deleter.rb