るりまサーチ

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

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. float >
  4. complex >
  5. module >

検索結果

<< < ... 3 4 5 >>

Rinda::TupleSpaceProxy#take(tuple, sec = nil) -> Array | Hash (3101.0)

tuple にマッチするタプルをタプルスペースから取り出して返します。

...ルスペースから取り出して返します。

内部的にはリモートオブジェクトの Rinda::TupleSpace#take にフォワードされます。
詳細は Rinda::TupleSpace#take を参照してください。

@param tuple タプルのパターン
@param sec タイムアウト秒数
@r...

Rinda::TupleSpaceProxy#write(tuple, sec = nil) -> Rinda::TupleEntry (3101.0)

tuple をタプルスペースに加えます。 tuple を管理するための Rinda::TupleEntry オブジェクトを返します。

...da::TupleEntry オブジェクトを返します。

内部的にはリモートオブジェクトの Rinda::TupleSpace#write にフォワードされます。
詳細は Rinda::TupleSpace#write を参照してください。

@param tuple 追加する tuple (配列かHash)
@param sec 有効期限(...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (207.0)

namespace と name で特定される属性を返します。

...namespace と name で特定される属性を返します。

namespace で名前空間を、 name で prefix を含まない属性名を
指定します。

指定された属性が存在しない場合は nil を返します。

XML プロセッサが prefix を置き換えてしまった場合...
...@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = d...
...ot/a").first

a.attributes.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}...

REXML::Element#attribute(name, namespace = nil) -> REXML::Attribute | nil (207.0)

name で指定される属性を返します。

...ます。

namespace で名前空間の URI を指定することで、その名前空間内で
name という属性名を持つ属性を指定できます。

指定した属性名の属性がない場合は nil を返します。

@param name 属性名(文字列)
@param namespace 名前空間のUR...
...xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first
a.attribute("att") # => att='&lt;'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("bar:att") # => bar:att='2'
a.attribute("baz") # => nil
//}...

JSON::State#to_h -> Hash (113.0)

自身をハッシュに変換します。

...quire "pp"

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# :depth=>0,
# :buffer_initial_length=>1024}
//}...

絞り込み条件を変える

JSON::State#to_hash -> Hash (113.0)

自身をハッシュに変換します。

...quire "pp"

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# :depth=>0,
# :buffer_initial_length=>1024}
//}...

String#scanf(format) -> Array (107.0)

ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。

...見つからない場合は空の配列を
生成して返します。

require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]

ブロックを指定した場合は scanf を継続して実行し、順次
見つかった文字列を変換したオブジェクト...
...x"){|n, s| [n, s]}
#=> [[123, 69], [678, 144]]

formatに完全にマッチしていなくても、部分的にマッチしていれば、
ブロックは実行されます。

require 'scanf'
str = "123 abc 456 def"
ret = str.scanf("%s%d") { |s, n| [s, n] }
p ret #=> [["123", nil], ["abc"...
...細は、m:String#scanf#format を参照してください。

使用例:
require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]

===[a:format] scanfフォーマット文字列

文字 '%' と(s,d のような)指示子の間に、整数を指定する事により...

String#scanf(format) {|*ary| ...} -> Array (107.0)

ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。

...見つからない場合は空の配列を
生成して返します。

require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]

ブロックを指定した場合は scanf を継続して実行し、順次
見つかった文字列を変換したオブジェクト...
...x"){|n, s| [n, s]}
#=> [[123, 69], [678, 144]]

formatに完全にマッチしていなくても、部分的にマッチしていれば、
ブロックは実行されます。

require 'scanf'
str = "123 abc 456 def"
ret = str.scanf("%s%d") { |s, n| [s, n] }
p ret #=> [["123", nil], ["abc"...
...細は、m:String#scanf#format を参照してください。

使用例:
require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]

===[a:format] scanfフォーマット文字列

文字 '%' と(s,d のような)指示子の間に、整数を指定する事により...
<< < ... 3 4 5 >>