Skip to content

Instantly share code, notes, and snippets.

@mirakui mirakui/cheatsheet-ruby.md
Last active Dec 23, 2015

Embed
What would you like to do?

入出力

標準入力を隠す

require 'io/console'
password = STDIN.noecho(&:gets).chomp

日付・時刻

Time.now.strftime("%Y/%m/%d %H:%M:%S")
# => "2013/09/20 15:08:22"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.