Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#4 fin.

  • Loading branch information...
commit 8aeab115c089d915ae7347b1db9b45e76fd333a8 1 parent b54385d
Ryo HIGASIGAWA authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 daisan_bot.rb
9 daisan_bot.rb
View
@@ -27,6 +27,11 @@
SATURDAY = 6
SUNDAY = 0
+def stop_operation_message(tweet)
+ return '本日の運行は終了しました。' if tweet.empty?
+ tweet
+end
+
def split_table(column)
timetable = "table[@class='timetable_suminodo']"
"//#{timetable}//td[#{column}]|//#{timetable}//th[#{column}]"
@@ -86,9 +91,9 @@ def collect_table(timetable)
end
if Time.now.wday < SATURDAY
- tweets[0]
+ stop_operation_message(tweets[0])
else
- tweets[1]
+ stop_operation_message(tweets[1])
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.