るりまサーチ

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

別のキーワード

  1. set new
  2. stringio set_encoding
  3. _builtin set_encoding
  4. tracer set_get_line_procs
  5. set divide

キーワード

検索結果

set (6101.0)

集合を表す Set クラスと、取り出し順序を保証した SortedSet クラスを提供 します。

...合を表す Set クラスと、取り出し順序を保証した SortedSet クラスを提供
します。

集合とは重複のないオブジェクトの集まりです。
Array の持つ演算機能と Hash の高速な検索機能を合わせ持ちます。

Set
および SortedSet は内部...
...

Set
クラスでは、集合要素を取り出す際の順序は保証されません。
一方、SortedSet では、集合要素はソートされた順序で取り出されます。

また、set ライブラリを require すると Enumerable モジュールが
拡張され、Enumerable#to_set...
...
されます。

=== 例
//emlist[][ruby]{
require 'set'

set
1 = Set.new ["foo", "bar", "baz", "foo"]

p set1 # => #<Set: {"foo", "bar", "baz"}>
p set1.include?("bar") # => true

set
1.add("heh")
set
1.delete("foo")
p set1 # => #<Set: {"bar", "baz", "heh"}>
//}...
...集合を表す Set クラスを提供します。

集合とは重複のないオブジェクトの集まりです。
Array の持つ演算機能と Hash の高速な検索機能を合わせ持ちます。

Set
は内部記憶として Hash を使うため、集合要素の等価性は
Object#eql?...
...定義されている
必要があります。

Set
クラスでは、集合要素を取り出す際の順序は保証されません。

また、set ライブラリを require すると Enumerable モジュールが
拡張され、Enumerable#to_set の形で集合オブジェクトを生成でき...
...用されます。

=== 例
//emlist[][ruby]{
require 'set'

set
1 = Set.new ["foo", "bar", "baz", "foo"]

p set1 # => #<Set: {"foo", "bar", "baz"}>
p set1.include?("bar") # => true

set
1.add("heh")
set
1.delete("foo")
p set1 # => #<Set: {"bar", "baz", "heh"}>
//}...

xmlrpc (31.0)

XML-RPC を扱うためのライブラリです。

...ions that span
computer languages. Its distinctive feature is its simplicity compared to
other approaches like SOAP and CORBA.

The Ruby standard library package 'xmlrpc' enables you to create a server that
implements remote procedures and a client that calls them. Very little code
is required to...
...ll("sample.sumAndDifference", 5, 3)
pp result

=== Documentation

See http://www.ntecs.de/projects/xmlrpc4r. There is plenty of detail there to
use the client and implement a server.

=== Features of XMLRPC for Ruby

* Extensions
* Introspection
* multiCall
* optionally nil values a...
...sing a different XML Parser or XML Writer

The examples above all use the default parser (which is now since 1.8
REXMLStreamParser) and a default XML writer. If you want to use a different
XML parser, then you have to call the <i>set_parser</i> method of
XMLRPC::Client instances or instances of sub...

getoptlong (25.0)

getoptlong は、GNU の getopt_long() とまったく同じ方式でコマンド 行オプションの解析を行う Ruby のライブラリです。

...ッセージが、次のようになっているもの
とします。

Usage: command [option...]
Options:
-m SIZE --max-size SIZE Set maximum size
-q --quiet --silence Suppress all warnings
--help Output this help, then exit
--version...
...ラスのオブジェクトを生成します。

parser = GetoptLong.new

そして、set_options メソッドを呼び出し、この parser にオプションを
セットします。

parser.set_options(
['--max-size', '-m', GetoptLong::REQUIRED_ARGUMENT],
['--q...
...nd

each_option メソッドは、常にオプション名を「正式名 (canonical name)」
の形で返してきます。「正式名」とは、`set_options' へ渡した個々の引数に
おいて、一番左にあるオプション名のことです。たとえば、`--quiet' は、
`-q' と...

rdoc (13.0)

RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。

...ドも出力に含まれるように
なります(デフォルトではパブリックメソッドのみです)。

: --charset charset

生成する HTML の charset を指定します。

可能であれば --encoding を使用してください。

: --coverage-report level, --dcov level...
...encoding に指定します。rdoc が読
み込んだ全てのファイルはこの文字エンコーディングに変換されま
す。--charset オプションもありますが --encoding オプションを使用して
ください。

: --exclude pattern

pattern にマッチするデ...
...r. Set this
when building documentation outside the source directory. Default is
the current directory.

: --page-dir dir

Directory where guides, your FAQ or other pages not associated with
a class live. Set this when you don't store such files at your
project root. NOTE: Do not use th...

rubygems/commands/generate_index_command (13.0)

ある Gem サーバに対するインデックスを作成するためのライブラリです。

...y
Description:
The generate_index command creates a set of indexes for serving gems
statically. The command expects a 'gems' directory under the path given to
the --directory option. When done, it will generate a set of files like
this:

gems/...

絞り込み条件を変える

net/http (7.0)

汎用データ転送プロトコル HTTP を扱うライブラリです。 実装は 2616 に基きます。

...より細かく制御する
url = URI.parse('http://www.example.com/todo.cgi')
req = Net::HTTP::Post.new(url.path)
req.basic_auth 'jack', 'pass'
req.set_form_data({'from'=>'2005-01-01', 'to'=>'2005-03-31'})
res = Net::HTTP.new(url.host, url.port).start {|http| http.request(req) }
case res
when Net::...

rss (7.0)

RSS を扱うためのライブラリです。

...s = RSS::Parser.parse(rss_source)
item = RSS::RDF::Item.new(rdf_about_value)
rss.items << item
rss.items.last == item # => true

注意: item=/set_itemなどはRubyっぽくないので使わないでくださ
い.

=== 出力

RSS Parserといっているので誤解されがちですが,...
...:type => "...",
:title => "...",
:media => "...",
:charset => "...",
:alternate => "...",
}

連想配列:

[
[:href, "..."],
[:type, "..."],
[:title, "..."],
[:media, "..."],
[:charset, "..."],
[:alternate, "..."],
]

全てのキーは省略可能...
...setup_makerというメソッドを持っ
ています。これは、自分が持っている情報をRSS Makerに与えるメソッ
ドです。to_feedはRSS::Maker.makeで作ったRSS Makerに対して
set
up_makerを行い、他の形式に変換しようとします。ブロックには
set
up_...

test/unit (7.0)

ユニットテストを行うためのライブラリです。

...メソッドが実行される前には setup メソッドが必ず
呼ばれます。実行されたあとには、teardown メソッドが必ず呼ばれます。

require 'test/unit'
require 'foo'

class TC_Foo < Test::Unit::TestCase
def setup
@obj = Foo.new
end...
...oo.rb --help
Usage: test_foo [options]
minitest options:
-h, --help Display this help.
-s, --seed SEED Sets random seed
-v, --verbose Verbose. Show progress processing files.
-n, --name PATTERN Filter...
...suites.
-x, --exclude PATTERN Exclude test files on pattern.
-Idirectory Add library load path
--[no-]gc-stress Set GC.stress as true

複数のテストを一度に行う場合、以下のように書いただけのファイルを実...

tracer (7.0)

実行トレース出力をとる機能を提供します。

...class Hoge
def Hoge.fuga(i)
"fuga #{i}"
end
end

Tracer.add_filter {|event, file, line, id, binding, klass|
event =~ /line/ and klass.to_s =~ /hoge/i
}
Tracer.on
for i in 0..3
puts Hoge.fuga(i) if i % 3 == 0
end
Tracer.off

=== SEE ALSO

Kernel.#set_trace_func...