This file contains 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
# encoding: utf-8 | |
require 'date' | |
require './timer.rb' | |
@last_update = nil | |
def tweet | |
d = DateTime.now |
This file contains 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
# encoding: utf-8 | |
dic = {'朝' => 'first', '昼' => 'second', '夜' => 'third'} | |
# キーから対応する値を取れる | |
# 逆(値からキーを取る)はできない | |
puts dic['朝'] # first | |
puts dic['昼'] # second | |
puts dic['夜'] # third |
This file contains 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
# encoding: utf-8 | |
require 'date' | |
@dic = {'朝' => 'first', '昼' => 'second', '夜' => 'third'} | |
def meshi(str) | |
today = Date.today |