516件ヒット
[1-100件を表示]
(0.079秒)
ライブラリ
- ビルトイン (199)
- csv (15)
- date (4)
- forwardable (24)
-
irb
/ cmd / pushws (12) - json (12)
-
net
/ http (12) - rake (48)
-
rubygems
/ commands / dependency _ command (12) -
rubygems
/ dependency _ list (12) - shell (24)
-
shell
/ builtin-command (12) -
shell
/ command-processor (24) -
shell
/ filter (30) - thread (4)
- zlib (72)
クラス
- Array (16)
- CSV (12)
-
CSV
:: Row (3) - Data (3)
- Date (2)
- DateTime (2)
-
Enumerator
:: ArithmeticSequence (7) -
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: DependencyList (12) - Hash (79)
- IO (36)
-
IRB
:: ExtendCommand :: PushWorkspace (12) - Object (24)
-
Rake
:: TaskArguments (24) - Range (12)
- Shell (24)
-
Shell
:: AppendFile (6) -
Shell
:: AppendIO (6) -
Shell
:: CommandProcessor (24) -
Shell
:: Filter (30) -
Thread
:: Queue (12) -
Thread
:: SizedQueue (12) - Time (2)
-
Zlib
:: Deflate (12) -
Zlib
:: GzipWriter (24) -
Zlib
:: Inflate (12) -
Zlib
:: ZStream (24)
モジュール
- FileUtils (12)
- Forwardable (24)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (12)
-
Net
:: HTTPHeader (12)
キーワード
- [] (18)
- append (18)
-
close
_ read (12) -
close
_ write (12) -
deconstruct
_ keys (12) -
default
_ proc= (12) - delegate (12)
- execute (12)
- fetch (12)
-
find
_ gems (12) - finish (24)
- finished? (12)
- flush (36)
- hash (19)
- input= (12)
-
instance
_ delegate (12) - invert (12)
-
marshal
_ dump (12) - merge (24)
- mkdir (18)
- push (8)
- replace (12)
- rule (12)
- shift (36)
-
spec
_ predecessors (12) -
stream
_ end? (12) - test (18)
-
to
_ h (19) -
to
_ hash (24) -
to
_ json (12) - unshift (8)
-
with
_ defaults (12) - | (6)
検索結果
先頭5件
- FileUtils
# sh(*cmd) {|result , status| . . . } - Shell
# append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO - Shell
:: CommandProcessor # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO - Shell
:: Filter # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO - Zlib
:: Deflate # flush(flush = Zlib :: SYNC _ FLUSH) -> String
-
FileUtils
# sh(*cmd) {|result , status| . . . } (18132.0) -
与えられたコマンドを実行します。
...参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.exitstatus})"
end
end
@see Kernel.#exec, Kernel.#system... -
Shell
# append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (9501.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
:: CommandProcessor # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (9501.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
:: Filter # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (9501.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Zlib
:: Deflate # flush(flush = Zlib :: SYNC _ FLUSH) -> String (6343.0) -
deflate('', flush) と同じです。flush が 省略された時は Zlib::SYNC_FLUSH が使用されます。 このメソッドはスクリプトの可読性のために提供されています。
...deflate('', flush) と同じです。flush が
省略された時は Zlib::SYNC_FLUSH が使用されます。
このメソッドはスクリプトの可読性のために提供されています。
@param flush Zlib::NO_FLUSH Zlib::SYNC_FLUSH Zlib::FULL_FLUSH などを指定します。
requir......te(' end', Zlib::FINISH)
dez.close
p comp_str
p Zlib::Inflate.inflate(comp_str)
end
def case2
dez = Zlib::Deflate.new
comp_str = dez.deflate('hoge')
comp_str << dez.flush
comp_str << dez.deflate(' fuga')
comp_str << dez.flush
comp_str << dez.deflate(' end', Z......ISH)
dez.close
p comp_str
p Zlib::Inflate.inflate(comp_str)
end
case1
case2
#=> "x\234\313\310OOUH+MOTH\315K\001\000!\251\004\276"
#=> "hoge fuga end"
#=> "x\234\312\310OO\005\000\000\000\377\377RH+MO\004\000\000\000\377\377SH\315K\001\000!\251\004\276"
#=> "hoge fuga end"... -
Zlib
:: GzipWriter # flush(flush = Zlib :: SYNC _ FLUSH) -> self (6313.0) -
まだ書き出されていないデータをフラッシュします。
...フラッシュします。
flush は Zlib::Deflate#deflate と同じです。
省略時は Zlib::SYNC_FLUSH が使用されます。
flush に Zlib::NO_FLUSH を指定することは無意味です。
@param flush Zlib::NO_FLUSH Zlib::SYNC_FLUSH Zlib::FULL_FLUSH などを指定します。
req......p File.read(filename)
end
def case2
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz.puts "fuga"
gz.flush
gz.puts "ugo\n"
gz.flush
}
p File.read(filename)
end
case1
#=> "\037\21... -
Object
# to _ hash -> Hash (6213.0) -
オブジェクトの Hash への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...オブジェクトの Hash への暗黙の変換が必要なときに内部で呼ばれます。
デフォルトでは定義されていません。
説明のためここに記載してありますが、
このメソッドは実際には Object クラスには定義されていません。
必要......すべての場面で代置可能であるような、
* ハッシュそのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_hash
{'as' => 24}
end
end
it = Foo.new
p({:as => 12}.merge(it)) #=> {"as"=>24, :as=>12}
//}... -
Rake
:: TaskArguments # to _ hash -> Hash (6207.0) -
パラメータ名と対応する値を格納したハッシュを返します。
...納したハッシュを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.to_hash # => {:name1=>"value1", :name2=>"value2"}
end
//}... -
Object
# marshal _ dump -> object (6125.0) -
Marshal.#dump を制御するメソッドです。
...Marshal.#dump を制御するメソッドです。
Marshal.dump(some) において、出力するオブジェクト some がメソッド marshal_dump を
持つ場合には、その返り値がダンプされたものが Marshal.dump(some) の返り値となります。
marshal_dump/marshal_load......rshal_dump/marshal_load を使うべきです。
@return 任意のオブジェクトで marshal_load の引数に利用できます。
//emlist[][ruby]{
class Foo
def initialize(arg)
@foo = arg
end
def marshal_dump
@foo
end
def marshal_load(obj)
p obj
@foo = obj
end
end......'bar'])
p foo #=> #<Foo:0xbaf3b0 @foo=["foo", "bar"]>
dms = Marshal.dump(foo)
p dms #=> "\004\bU:\bFoo[\a\"\bfoo\"\bbar"
result = Marshal.load(dms) #=> ["foo", "bar"] # marshal_load の引数
p result #=> #<Foo:0xbaf2ac @foo=["foo", "bar"]>... -
Range
# hash -> Integer (6117.0) -
始端と終端のハッシュ値と Range#exclude_end? の値からハッシュ値を計算して整数として返します。
...始端と終端のハッシュ値と Range#exclude_end? の値からハッシュ値を計算して整数として返します。
//emlist[例][ruby]{
p (1..2).hash # => 5646
p (1...2).hash # => 16782863
//}...