るりまサーチ

最速Rubyリファレンスマニュアル検索!
1107件ヒット [1-100件を表示] (0.161秒)
トップページ > クエリ:I[x] > クエリ:i[x] > クエリ:new[x] > クエリ:to_s[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. csv to_i

ライブラリ

検索結果

<< 1 2 3 ... > >>

IPAddr#to_s -> String (44313.0)

文字列に変換します。

...文字列に変換します。

require 'ipaddr'
addr6 = IPAddr.new('::1')
addr6.to_s #=> "::1"
addr6.to_string #=> "0000:0000:0000:0000:0000:0000:0000:0001"

@see IPAddr#to_string...

IPAddr#to_string -> String (38518.0)

標準的な文字列表現に変換します。

...標準的な文字列表現に変換します。

require 'ipaddr'
addr6 = IPAddr.new('::1')
addr6.to_s #=> "::1"
addr6.to_string #=> "0000:0000:0000:0000:0000:0000:0000:0001"

@see IPAddr#to_s...

Rake::InvocationChain.new(task_name, tail) (30325.0)

与えられたタスク名と一つ前の Rake::InvocationChain を用いて自身を初期化します。

...e::InvocationChain を用いて自身を初期化します。

@param task_name タスク名を指定します。

@param tail 一つ前の Rake::InvocationChain を指定します。

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

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

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

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

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

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

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

Digest::Base#to_s -> String (27307.0)

updateや<<によって追加した文字列に対するハッシュ値を、 ASCIIコードを使って16進数の列を示す文字列にエンコードして返します。

...updateや<<によって追加した文字列に対するハッシュ値を、
ASCIIコードを使って16進数の列を示す文字列にエンコードして返します。

返す文字列は、
MD5では32バイト長、SHA1およびRMD160では40バイト長、SHA256では64バイト長、
SH...
...バイト長です。

Rubyで書くと以下と同じです。

def hexdigest
digest.unpack("H*")[0]
end

例:

# MD5の場合
require 'digest/md5'
digest = Digest::MD5.new
digest.update("ruby")
p digest.hexdigest # => "58e53d1324eef6265fdb97b08ed9aadf"

@see Digest::Base#digest...

絞り込み条件を変える

IPAddr#succ -> IPAddr (26212.0)

次の IPAddr オブジェクトを返します。

...次の IPAddr オブジェクトを返します。

require 'ipaddr'
i
paddr = IPAddr.new('192.168.1.1')
p ipaddr.succ.to_s #=> "192.168.1.2"...

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

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>'
/...

Gem::Requirement#to_s -> String (24313.0)

条件を表す文字列を返します。

...条件を表す文字列を返します。

//emlist[][ruby]{
req = Gem::Requirement.new(["< 5.0", ">= 1.9"])
p req.to_s # => "< 5.0, >= 1.9"
//}...

Gem::Version#to_s -> String (24313.0)

バージョン情報を文字列として返します。

...バージョン情報を文字列として返します。

//emlist[][ruby]{
version = Gem::Version.new("1.2.3a")
p version.to_s # => "1.2.3a"
p version.version # => "1.2.3a"
//}...

REXML::Entity#to_s -> String (24313.0)

実体宣言を文字列化したものを返します。

...実体宣言を文字列化したものを返します。

@see REXML::Entity#write

//emlist[][ruby]{
e = REXML::ENTITY.new("w", "wee");
p e.to_s # => "<!ENTITY w \"wee\">"
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>