ライブラリ
- ビルトイン (1991)
- abbrev (24)
- coverage (24)
- csv (303)
- date (4)
- json (144)
-
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) - logger (36)
-
net
/ http (48) - objspace (36)
- open-uri (12)
- openssl (24)
- optparse (132)
- ostruct (7)
- pp (24)
- psych (12)
- rake (36)
- rbconfig (12)
-
rbconfig
/ sizeof (24) -
rubygems
/ requirement (12) -
rubygems
/ version (24) - set (9)
- thread (4)
- timeout (21)
-
webrick
/ httprequest (12) -
webrick
/ ssl (12) - zlib (12)
クラス
- Array (139)
- CSV (252)
-
CSV
:: Row (15) -
CSV
:: Table (36) - Coverage (24)
- Data (12)
- Date (14)
- DateTime (14)
- Encoding (36)
-
Encoding
:: Converter (12) - Exception (12)
- File (12)
- Float (12)
-
Gem
:: Requirement (12) -
Gem
:: Version (24) - Hash (1182)
- IO (48)
-
JSON
:: State (24) - Logger (36)
- MatchData (14)
- Method (12)
-
Net
:: HTTPResponse (24) - Object (60)
-
OpenSSL
:: BN (24) - OpenStruct (7)
- OptionParser (120)
- PP (24)
-
Psych
:: Visitors :: YAMLTree (12) -
Rake
:: TaskArguments (24) - Random (24)
- Range (24)
- Regexp (24)
-
RubyVM
:: InstructionSequence (12) - Set (12)
- String (60)
- Struct (49)
-
Thread
:: Queue (12) -
Thread
:: SizedQueue (12) - Time (14)
- UnboundMethod (12)
-
WEBrick
:: HTTPRequest (12) -
Zlib
:: GzipWriter (12)
モジュール
- Abbrev (12)
- Enumerable (41)
- FileUtils (12)
- GC (24)
-
GC
:: Profiler (12) -
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (60)
- Marshal (72)
-
Net
:: HTTPHeader (24) - ObjectSpace (48)
-
OpenURI
:: Meta (12) -
OptionParser
:: Arguable (12) - RbConfig (36)
- Timeout (21)
-
WEBrick
:: Config (12)
オブジェクト
- ENV (37)
キーワード
- < (10)
- <= (10)
- == (12)
- === (12)
- > (10)
- >= (10)
-
CODE
_ CLASS _ TO _ OBJ (12) -
CODE
_ TO _ OBJ (12) - CONFIG (12)
- DOSISH 対応 (12)
- Hash (12)
- LIMITS (12)
-
MAJOR
_ VERSION (12) -
MINOR
_ VERSION (12) - Marshal (12)
- Marshal フォーマット (12)
- OPS (12)
- Rubyの起動 (12)
-
SCRIPT
_ LINES _ _ (12) -
SHIFT
_ JIS (12) - SIZEOF (12)
- SSL (12)
-
Shift
_ JIS (12) - [] (36)
- []= (12)
- abbrev (24)
- aliases (12)
- assoc (12)
- classify (12)
- clear (12)
- clone (12)
-
close
_ read (12) -
close
_ write (12) - closed? (12)
- compact (9)
- compact! (9)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) -
compile
_ option (12) -
count
_ nodes (12) -
count
_ objects (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) -
deconstruct
_ keys (20) - default (24)
- default= (12)
-
default
_ proc (12) -
default
_ proc= (12) - delete (24)
-
delete
_ if (24) - dig (10)
- dump (24)
- dup (12)
- each (24)
-
each
_ key (24) -
each
_ pair (24) -
each
_ value (24) - empty? (12)
- eql? (12)
- equal? (12)
- except (8)
- fetch (48)
-
fetch
_ values (20) - filter (50)
- filter! (14)
- finish (24)
- flatten (12)
- flock (12)
- flush (12)
- foreach (24)
- generate (12)
-
generate
_ line (12) - getopts (36)
-
group
_ by (12) - gsub (12)
- gsub! (12)
-
has
_ key? (12) -
has
_ value? (12) - hash (123)
- include? (12)
- index (7)
- inspect (12)
- instance (24)
- invert (12)
-
json
_ create (96) -
keep
_ if (24) - key (12)
- key? (12)
- keys (12)
-
latest
_ gc _ info (12) - length (12)
- load (12)
- lshift! (12)
-
marshal
_ dump (36) -
marshal
_ load (36) - member? (12)
- merge (24)
- merge! (24)
-
named
_ captures (12) - new (48)
- on (96)
- open (48)
-
optparse
/ shellwords (12) - parse (24)
-
parse
_ line (12) -
peek
_ result (12) - push (36)
- query (12)
- rassoc (12)
-
raw
_ data (12) -
rb
_ ary _ push (12) -
rb
_ ary _ shift (12) - read (12)
- readlines (12)
- rehash (12)
- reject (36)
- reject! (24)
- replace (12)
- restore (12)
- result (12)
- rshift! (12)
-
ruby 1
. 9 feature (12) -
ruby2
_ keywords _ hash? (6) -
rubygems
/ digest / sha1 (12) -
rubygems
/ digest / sha2 (12) - select (24)
- select! (24)
-
sev
_ threshold (12) -
sev
_ threshold= (12) -
sharing
_ detection (12) -
sharing
_ detection= (12) - shell (6)
- shift (72)
- shuffle (24)
- shuffle! (24)
- size (12)
- slice (15)
- spawn (48)
- stat (12)
- store (12)
- sub (12)
- sub! (12)
- table (12)
- tally (10)
- timeout (21)
-
to
_ a (12) -
to
_ csv (12) -
to
_ h (115) -
to
_ hash (60) -
to
_ json (108) -
to
_ proc (10) -
to
_ s (24) -
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) -
try
_ convert (12) -
type
_ params (12) - unshift (12)
- update (24)
- value? (12)
- values (12)
-
values
_ at (12) -
with
_ defaults (12) - 制御構造 (12)
- 多言語化 (12)
- 環境変数 (12)
検索結果
先頭5件
-
shell (26176.0)
-
Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。
...Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。
sh/csh の制御文は Ruby の機能を用いて実現します。
=== サンプル
==== Example 1:
require 'shell'
sh = Shell.cd("/tmp")
sh.mkdir "shell-test......-1" unless sh.exists?("shell-test-1")
sh.cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
unless sh.exists?(dir)
sh.mkdir dir
sh.cd(dir) do
f = sh.open("tmpFile", "w")
f.puts "TEST"
f.close
end
print sh.pwd
end
end
==== Example 2:......require 'shell'
sh = Shell.cd("/tmp")
sh.transact do
mkdir "shell-test-1" unless exists?("shell-test-1")
cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
if !exists?(dir)
mkdir dir
cd(dir) do
f = open("tmpFile", "w")
f.print "TEST\n"... -
FileUtils
# ruby(*args) {|result , status| . . . } (18135.0) -
与えられた引数で Ruby インタプリタを実行します。
...与えられた引数で Ruby インタプリタを実行します。
@param args Ruby インタプリタに与える引数を指定します。
例:
ruby %{-pe '$_.upcase!' <README}
@see Kernel.#sh... -
Hash
. ruby2 _ keywords _ hash?(hash) -> bool (15391.0) -
Module#ruby2_keywordsやProc#ruby2_keywordsによる ruby2_keywords フラグが設定されているかどうかを返します。
...Module#ruby2_keywordsやProc#ruby2_keywordsによる
ruby2_keywords フラグが設定されているかどうかを返します。
このメソッドはデバッグや調査、シリアライゼーションのために本当に必要な場合のために
用意されていて、普通のプログ......れていません。
ruby 2.7.1 で追加されたため、ruby 2.7.0 では定義されていません。
//emlist[][ruby]{
ruby2_keywords def foo(*args)
Hash.ruby2_keywords_hash?(args.last)
end
foo(k: 1) # => true
foo({k: 1}) # => false
//}
@see Module#ruby2_keywords, Proc#ruby2_keywords... -
rubygems
/ digest / sha1 (12000.0) -
Digest::SHA1 をラップするためのライブラリです。
...Digest::SHA1 をラップするためのライブラリです。... -
rubygems
/ digest / sha2 (12000.0) -
Digest::SHA256 をラップするためのライブラリです。
...Digest::SHA256 をラップするためのライブラリです。... -
Hash
# shift -> [object , object] | nil (9112.0) -
ハッシュからキーが追加された順で先頭の要素をひとつ取り除き、 [key, value]という配列として返します。
...ue]という配列として返します。
shiftは破壊的メソッドです。selfは要素を取り除かれた残りのハッシュに変更されます。
Ruby 3.2以前は、ハッシュが空の場合、デフォルト値(Hash#defaultまたはHash#default_procのブロックの値か、......。
//emlist[例][ruby]{
h = {:ab => "some" , :cd => "all"}
p h.shift #=> [:ab, "some"]
p h.shift #=> [:cd, "all"]
p h #=> {}
p h.shift #=> nil
h1 = Hash.new("default value")
p h1 #=> {}
p h1.shift #=> "d......efault value"
h2 = Hash.new {|*arg| arg}
p h2 #=> {}
p h2.shift #=> [{}, nil]
//}
@see Array#shift... -
Hash
# hash -> Integer (9106.0) -
自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。 自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
...自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。
自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
//emlist[例][ruby]{
a = {}
p a.hash #=> 0
a[1] = :x
p a.hash #=> 329543
//}... -
Hash
# rehash -> self (9106.0) -
キーのハッシュ値を再計算します。
...raise RuntimeError Hash#eachなどのイテレータの評価途中でrehashすると発生します。
@return selfを返します。
//emlist[例][ruby]{
a = [ "a", "b" ]
h = { a => 100 }
p h[a] #=> 100
a[0] = "z"
p h[a] #=> nil
h.rehash
p h[a] #=> 100
//}
@see Object#hash... -
Hash
# shift -> [object , object] | nil (9106.0) -
ハッシュからキーが追加された順で先頭の要素をひとつ取り除き、 [key, value]という配列として返します。
...します。
shiftは破壊的メソッドです。selfは要素を取り除かれた残りのハッシュに変更されます。
ハッシュが空の場合、デフォルト値に関わらず nil を返します。
//emlist[例][ruby]{
h = {:ab => "some" , :cd => "all"}
p h.shift......> [:ab, "some"]
p h.shift #=> [:cd, "all"]
p h #=> {}
p h.shift #=> nil
h1 = Hash.new("default value")
p h1 #=> {}
p h1.shift #=> nil
h2 = Hash.new {|*arg| arg}
p h2 #=> {}
p h2.shift #=......> nil
//}
@see Array#shift... -
Hash
# to _ hash -> self (9106.0) -
self を返します。
...self を返します。
//emlist[例][ruby]{
hash = {}
p hash.to_hash # => {}
p hash.to_hash == hash # => true
//}
@see Object#to_hash, Hash#to_h... -
Rubyの起動 (6291.0)
-
Rubyの起動 * cmd_option * shebang
...Rubyの起動
* cmd_option
* shebang
Rubyインタプリタの起動は以下の書式のコマンドラインにより行います。
ruby [ option ...] [ -- ] [ programfile ] [ argument ...]
ここで、option は後述のcmd_option
のいずれかを指定します。-- は、オプシ......、Ruby スクリプトを記述したファイ
ルです。これを省略したり`-' を指定した場合には標準入力を Ruby ス
クリプトとみなします。
programfile が `#!' で始まるファイルである場合、特殊な解釈
が行われます。詳細は後述のshebang......Object::ARGV の初
期値として設定されます。標準のシェルがワイルドカードを展開しない環境
(platform/Win32)では、Ruby インタプリタが自前でワイルドカードを展開して
Object::ARGV に設定します。この場合ワイルドカードとして
`*'...