るりまサーチ

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

別のキーワード

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

検索結果

Rake::InvocationChain::EmptyInvocationChain#to_s -> String (30202.0)

'TOP' という文字列を返します。

'TOP' という文字列を返します。

Rake::InvocationChain#to_s -> String (24208.0)

トップレベルのタスクから自身までの依存関係を文字列として返します。

...の依存関係を文字列として返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
invocation_chain= Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
invocation_chain.to_s # => "TOP => task_a"
end
//}...

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

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

...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 `init...
...ialize'
# path/to/foo.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
//}...

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

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

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

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

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

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

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

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

絞り込み条件を変える

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

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

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


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

@see File.truncate...

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

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

...trace::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 (6102.0)

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

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

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

パイプ結合を 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/pass...
...wd") | head("-n #{i}") | tail("-n 1")).to_s
i += 1
end
}...