This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@hash_title_categories = {"Circuit"=>["interval training", "cardio", "strength"], "Spinsanity"=>["cycling", "cardio"], | |
| "Zumba ®"=>["dance", "cardio"], "Hydro Power"=>["water exercise", "strength", "cardio"], | |
| "Hydro Fitness"=>["water exercise", "strength", "cardio"], "Gold N Fit"=>["senior fitness"], | |
| "Indoor Cycling"=>["cycling", "cardio"], "Tabata Toning"=>["interval training", "cardio", "strength"], | |
| "Parkinson's Program"=>["medical"], "Mat Pilates"=>["pilates", "strength"], "PD FIT"=>["medical"], "BODYPUMP ™"=>["bodypump", "strength"], | |
| "Yoga Level 1"=>["yoga"], "Raw Groove"=>["dance", "cardio"], "R.I.P.P.E.D. ®"=>["interval training", "cardio", "strength"], | |
| "Cycle Craze"=>["cycling", "cardio"], "Family Circuit"=>["interval training", "cardio", "strength"], "Abs, Back, & Booty"=>["strength"], | |
| "Tabata Toning (30 min)"=>["interval training", "cardio", "streng |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def collect_titles | |
| @titles = [] | |
| days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] | |
| #loop through all the days, then through all the entries of that day to collect the class titles | |
| days.each do |day| | |
| @document.css("div#GXP#{day}").css("div.GXPEntry").each do |fitclass| | |
| @titles << fitclass.css("div.GXPTitle").text.strip unless @titles.include?(fitclass.css("div.GXPTitle").text.strip) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_document(url) | |
| browser = Watir::Browser.new(:phantomjs) | |
| browser.goto(url) | |
| Nokogiri::HTML(browser.html) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Our CLI controller. input, welcoming - deal with user | |
| class FargoFitnessDaily::CLI | |
| def call | |
| list_classes | |
| menu | |
| goodbye | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class_1 = FargoFitnessDaily::FitnessClass.new | |
| class_1.name = "Raw Groove" | |
| class_1.location = "Family Wellness" | |
| class_1.time = "8 AM" | |
| class_1.instructor = "Jeanne" | |
| class_1.url = "http://www.familywellnessfargo.org/fitness/group-fitness/" | |
| class_2 = FargoFitnessDaily::FitnessClass.new | |
| class_2.name = "Dance Mixx" | |
| class_2.location = "Jazzercise Fargo The PRACS Building" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Our CLI controller. input, welcoming - deal with user | |
| class FargoFitnessDaily::CLI | |
| def call | |
| list_classes | |
| menu | |
| goodbye | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FargoFitnessDaily::FitnessClass | |
| @@all = [] | |
| def self.today | |
| # this should return all instances of FitnessClass | |
| puts <<-DOC.gsub /^\s*/, "" | |
| 1. Raw Groove - Family Wellness- 8 AM | |
| 2. Connective Tissue Restorative - Sacred Earth - 11 AM | |
| 3. Hot Detox Yoga - Mojo - 4 PM | |
| 4. Dance Mixx - Jazzercise Fargo The PRACS Building - 5:45 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require "family_wellness_daily" | |
| FamilyWellnessDaily::CLI.new.call |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
NewerOlder