るりまサーチ

最速Rubyリファレンスマニュアル検索!
67件ヒット [1-67件を表示] (0.153秒)

別のキーワード

  1. shell cat
  2. cat each
  3. cat new
  4. filter cat
  5. shell/filter cat

ライブラリ

キーワード

検索結果

Thread::Backtrace::Location#to_s -> String (24108.0)

self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。

...self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し
ます。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.to_s
end...
...# => path/to/foo.rb:5:in `initialize'
# path/to/foo.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
//}...

Shell::Filter#to_s -> String (21120.0)

実行結果を文字列で返します。

...実行結果を文字列で返します。

require 'shell'
Shell.def_system_command("wc")
sh = Shell.new

sh.transact {
puts (cat("/etc/passwd") | wc("-l")).to_s
}...

OpenSSL::X509::Certificate#to_s -> String (21102.0)

PEM 形式の文字列を返します。

PEM 形式の文字列を返します。

Pathname#truncate(length) -> 0 (6217.0)

File.truncate(self.to_s, length) と同じです。

...File.truncate(self.to_s, length) と同じです。


@param length 変更したいサイズを整数で与えます。

@see File.truncate...

Thread::Backtrace::Location#inspect -> String (6017.0)

Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。

...:Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call...
...|
puts call.inspect
end

# => "path/to/foo.rb:5:in `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}...

絞り込み条件を変える

OpenSSL::X509::Certificate#to_pem -> String (6002.0)

PEM 形式の文字列を返します。

PEM 形式の文字列を返します。

Shell::Filter#|(filter) -> object (3131.0)

パイプ結合を filter に対して行います。

...合を filter に対して行います。

@param filter Shell::Filter オブジェクトを指定します。

@return 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
}...