Skip to content

Instantly share code, notes, and snippets.

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