るりまサーチ

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n=
  3. rsa n
  4. openssl n
  5. openssl n=

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Date#>>(n) -> Date (21395.0)

self から n ヶ月後の日付オブジェクトを返します。 n は数値でなければなりません。

...self から n ヶ月後の日付オブジェクトを返します。
n
は数値でなければなりません。

//emlist[][ruby]{
require 'date'
Date.new(2001,2,3) >> 1 #=> #<Date: 2001-03-03 ...>
Date.new(2001,2,3) >> -2 #=> #<Date: 2000-12-03 ...>
//}


対応する月に同じ日が存...
...re 'date'
Date.new(2001,1,28) >> 1 #=> #<Date: 2001-02-28 ...>
Date.new(2001,1,31) >> 1 #=> #<Date: 2001-02-28 ...>
//}

このことは以下のように、もしかすると予期しない振る舞いをするかもしれません。

//emlist[][ruby]{
require 'date'
Date.new(2001,1,31) >> 2...
...#=> #<Date: 2001-03-31 ...>
Date.new(2001,1,31) >> 1 >> 1 #=> #<Date: 2001-03-28 ...>

Date.new(2001,1,31) >> 1 >> -1 #=> #<Date: 2001-01-28 ...>
//}

Date#next_month も参照してください。

@param n 月数...

IPAddr#>>(num) -> IPAddr (21301.0)

ビットごとの右シフト演算により、新しい IPAddr オブジェクトを生成します。

...ビットごとの右シフト演算により、新しい IPAddr オブジェクトを生成します。

@param num 右シフトする桁数。...

Process::Status#>>(num) -> Integer (21223.0)

self.to_i >> num と同じです。

...self.to_i >> num と同じです。

@param num 整数を指定します。

fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99...

REXML::Element#each_element_with_attribute(key, value = nil, max = 0, name = nil) {|element| ... } -> () (15355.0)

特定の属性を持つすべての子要素を引数としてブロックを呼び出します。

...とします。
value を指定すると、keyで指定した属性名を持つ属性の値がvalueである
もののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
n
ame を指定すると、それは xpath 文字列と...
...象となります。

max に 0 を指定すると、max の指定は無視されます(0個ではありません)。

@param key 属性名(文字列)
@param value 属性値(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列

//emlist[][rub...
...ument'
doc = REXML::Document.new("<a><b id='1'/><c id='2'/><d id='1'/><e/></a>")
doc.root.each_element_with_attribute('id'){|e| p e }
# >> <b id='1'/>
# >> <c id='2'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1'){|e| p e }
# >> <b id='1'/>
# >> <d id='1'/>
doc.root.each_element_w...

REXML::Element#each_element_with_text(text = nil, max = 0, name = nil) {|element| ... } -> () (15355.0)

テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。

...とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
n
ame を指定すると、それは xpath 文字列と見なされ、
それにマッチするもののみが対象となります。

max に 0 を指定すると、max の指定は無...
...@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
doc.root.each_element_with_text {|e|p e}
# >> <...
...b> ... </>
# >> <c> ... </>
# >> <d> ... </>
doc.root.each_element_with_text('b'){|e|p e}
# >> <b> ... </>
# >> <c> ... </>
doc.root.each_element_with_text('b', 1){|e|p e}
# >> <b> ... </>
doc.root.each_element_with_text(nil, 0, 'd'){|e|p e}
# >> <d> ... </>
//}...

絞り込み条件を変える

Object#singleton_class -> Class (12307.0)

レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。

...バが nil か true か false なら、それぞれ NilClass, TrueClass,
FalseClass を返します。

@raise TypeError レシーバが Integer、Float、Symbol の場合に発生します。

//emlist[][ruby]{
Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>>
String.singleton_class...
...#=> #<Class:String>
n
il.singleton_class #=> NilClass
//}

@see Object#class...

Date#next_year(n = 1) -> Date (12236.0)

n 年後を返します。

...n 年後を返します。

self >> (n * 12) に相当します。

//emlist[例][ruby]{
require 'date'
Date.new(2001,2,3).next_year #=> #<Date: 2002-02-03 ...>
Date.new(2008,2,29).next_year #=> #<Date: 2009-02-28 ...>
Date.new(2008,2,29).next_year(4) #=> #<Date: 2012-02-29 ...>
//}

Date#...
...>> も参照してください。

@param n 年数...

RubyVM::InstructionSequence#absolute_path -> String | nil (12207.0)

self が表す命令シーケンスの絶対パスを返します。

...ら作成していた場合は nil を返します。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil

例2: RubyVM::InstructionSequence.compile_file を使用し...
...た場合

# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"

@see RubyVM::InstructionSequence#path...

RubyVM::InstructionSequence#base_label -> String (12207.0)

self が表す命令シーケンスの基本ラベルを返します。

...iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
>...
...iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, world"
end

RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"

@see RubyVM::InstructionSequence#label...

RubyVM::InstructionSequence#label -> String (12207.0)

self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。

...ベルでは "<main>" を返します。self を文字列から作成していた場合
は "<compiled>" を返します。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<co...
...M::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, world"
end...
...RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"

@see RubyVM::InstructionSequence#base_label...

絞り込み条件を変える

<< 1 2 3 ... > >>