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
def incorrect_message(mascot, mess) | |
puts "\e[93m#{mascot}\e[0m\e[32m < #{mess}\e[0m" | |
end | |
answer_count = 0 | |
max_value = ARGV[0].to_i | |
incorrect_message '(´,,•ω•,,`)◝', | |
"1 から #{max_value} のあいだで こたえ の すうじ をいれてね" | |
input = STDIN.gets.to_i |
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
/(?<=\S)(?![\r\n]) +?$/ |
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
require 'fileutils' | |
require 'optparse' | |
require 'securerandom' | |
# あえてのオープンクラス | |
class String | |
# 引数用 | |
def to_multi_pf_arg | |
windows? ? self.gsub(File::ALT_SEPARATOR) {File::SEPARATOR} : self | |
end |
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
' アクティブブックの全シート名を取得し、配列で返します。 | |
Public Function SheetNameCollect() | |
Dim i As Long | |
Dim SheetCnt As Long | |
Dim SheetName() As String | |
SheetCnt = ThisWorkbook.Sheets.Count | |
ReDim SheetName(0 To SheetCnt - 1) |