715件ヒット
[1-100件を表示]
(0.173秒)
ライブラリ
- ビルトイン (417)
-
net
/ http (22) - openssl (121)
-
rubygems
/ dependency _ list (11) -
rubygems
/ gem _ path _ searcher (11) -
rubygems
/ package / tar _ input (11) -
rubygems
/ source _ index (11) -
rubygems
/ specification (22) - shell (12)
-
shell
/ builtin-command (12) -
shell
/ command-processor (24) -
shell
/ filter (30) -
webrick
/ httpauth / authenticator (11)
クラス
-
ARGF
. class (11) - Array (63)
-
Enumerator
:: Lazy (22) - File (11)
- Float (8)
-
Gem
:: DependencyList (11) -
Gem
:: GemPathSearcher (11) -
Gem
:: Package :: TarInput (11) -
Gem
:: SourceIndex (11) -
Gem
:: Specification (22) - Integer (4)
- Method (11)
-
Net
:: HTTP (22) -
OpenSSL
:: OCSP :: BasicResponse (11) -
OpenSSL
:: PKCS7 (11) -
OpenSSL
:: SSL :: SSLContext (22) -
OpenSSL
:: SSL :: SSLSocket (33) -
OpenSSL
:: X509 :: ExtensionFactory (22) -
OpenSSL
:: X509 :: Store (11) -
OpenSSL
:: X509 :: StoreContext (11) - Proc (11)
- Rational (11)
- Shell (12)
-
Shell
:: Cat (6) -
Shell
:: CommandProcessor (24) -
Shell
:: Concat (6) -
Shell
:: Filter (30) - Thread (22)
-
Thread
:: Backtrace :: Location (44) - UnboundMethod (11)
モジュール
- Enumerable (188)
-
WEBrick
:: HTTPAuth :: Authenticator (11)
キーワード
-
absolute
_ path (11) -
add
_ bindir (11) - all? (27)
- any? (42)
-
backtrace
_ locations (22) -
base
_ label (11) - cert (22)
- certificates (11)
- chain (22)
-
client
_ ca (11) - collect (22)
-
collect
_ concat (33) -
default
_ executable (11) - each (18)
- echo (18)
-
extra
_ chain _ cert (11) - find (11)
-
find
_ name (11) -
flat
_ map (33) - glob (18)
-
inplace
_ mode (11) - inspect (11)
-
issuer
_ certificate (11) -
load
_ gemspec (11) - map (22)
- none? (47)
- one? (47)
-
peer
_ cert (22) -
peer
_ cert _ chain (11) -
source
_ location (33) - specification (11)
- status (11)
-
subject
_ certificate (11) - tee (6)
-
to
_ s (17) - truncate (34)
- userdb (11)
検索結果
先頭5件
- Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter - Shell
:: Filter # |(filter) -> object - Enumerable
# collect _ concat {| obj | block } -> Array - Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil - Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil
-
Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter (21144.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee")... -
Shell
:: Filter # |(filter) -> object (18143.0) -
パイプ結合を filter に対して行います。
...rn filter を返します。
使用例
require 'shell'
Shell.def_system_command("tail")
Shell.def_system_command("head")
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
i = 1
while i <= (cat("/etc/passwd") | wc("-l")).to_s.chomp.to_i
puts (cat("/etc/passwd") |......head("-n #{i}") | tail("-n 1")).to_s
i += 1
end
}... -
Enumerable
# collect _ concat {| obj | block } -> Array (12415.0) -
各要素をブロックに渡し、その返り値を連結した配列を返します。
...ックに渡し、その返り値を連結した配列を返します。
ブロックの返り値は基本的に配列を返すべきです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[[1,2], [3,4]].flat_map{|i| i.map{|j| j*2}} # => [2,4,6,8]
//}... -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (12403.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...スを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレーム......ange 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locati......ons # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}
@see Thread::Backtrace::Location... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (12403.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...スを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレーム......ange 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locati......ons # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}
@see Thread::Backtrace::Location... -
Gem
:: SourceIndex # specification(full _ name) -> Gem :: Specification | nil (12402.0) -
指定された名前の Gem::Specification オブジェクトを返します。
...指定された名前の Gem::Specification オブジェクトを返します。
@param full_name Gem のフルネームを指定します。... -
OpenSSL
:: X509 :: ExtensionFactory # issuer _ certificate -> OpenSSL :: X509 :: Certificate | nil (12402.0) -
自身に設定されている発行者(issuer)の証明書オブジェクトを返します。
...自身に設定されている発行者(issuer)の証明書オブジェクトを返します。
証明書が設定されていない場合は nil を返します。... -
OpenSSL
:: X509 :: ExtensionFactory # subject _ certificate -> OpenSSL :: X509 :: Certificate | nil (12402.0) -
自身に設定されている所有者(subject)の証明書オブジェクトを返します。
...自身に設定されている所有者(subject)の証明書オブジェクトを返します。
証明書が設定されていない場合は nil を返します。... -
Enumerator
:: Lazy # collect _ concat {|item| . . . } -> Enumerator :: Lazy (12315.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
...ックの実行結果をひとつに繋げたものに対してイテレートするような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x......force メソッドを持つ (例:Enumerator::Lazy) とき
それ以外のときは、x は分解されず、そのままの値として使われます。
//emlist[][ruby]{
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force
#=> [{:a=>1}, {:b=>2}]
//}
@raise ArgumentError ブロックを指定しなか......った場合に発生します。
@see Enumerable#flat_map... -
Integer
# truncate(ndigits = 0) -> Integer | Float (12314.0) -
0 から self までの整数で、自身にもっとも近い整数を返します。
...。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返......します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.truncate # => 1
1.truncate(2) # => 1.0
18.truncate(-1) # => 10
(-18).truncate(-1) # => -10
//}
@see Numeric#truncate... -
Method
# source _ location -> [String , Integer] | nil (12302.0) -
ソースコードのファイル名と行番号を配列で返します。
...ブ
である)場合は nil を返します。
@see Proc#source_location
//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----
require '/tmp/foo'
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source_location # => ["/tmp/foo.rb", 2]......method(:puts).source_location # => nil
//}...