別のキーワード
種類
- 文書 (51)
- インスタンスメソッド (23)
- ライブラリ (22)
ライブラリ
- ビルトイン (23)
クラス
- Module (23)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Ruby用語集 (11)
- rdoc (11)
-
rexml
/ parsers / sax2parser (11) -
ruby 1
. 8 . 4 feature (11) - クラス/メソッドの定義 (11)
検索結果
先頭5件
-
Module
# public() -> nil (18144.0) -
メソッドを public に設定します。
...メソッドを public に設定します。
引数なしのときは今後このクラスまたはモジュール定義内で新規に定義さ
れるメソッドをどんな形式でも呼び出せるように(public)設定します。
引数が与えられた時には引数によって指定......されたメソッドを public に設
定します。
可視性については d:spec/def#limit を参照して下さい。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
@raise NameErr......。
//emlist[例][ruby]{
def foo() 1 end
p foo # => 1
# the toplevel default is private
p self.foo # => private method `foo' called for #<Object:0x401c83b0> (NoMethodError)
def bar() 2 end
public :bar # visibility changed (all access allowed)
p bar # => 2
p sel... -
Module
# public(*name) -> Array (18144.0) -
メソッドを public に設定します。
...メソッドを public に設定します。
引数なしのときは今後このクラスまたはモジュール定義内で新規に定義さ
れるメソッドをどんな形式でも呼び出せるように(public)設定します。
引数が与えられた時には引数によって指定......されたメソッドを public に設
定します。
可視性については d:spec/def#limit を参照して下さい。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
@raise NameErr......。
//emlist[例][ruby]{
def foo() 1 end
p foo # => 1
# the toplevel default is private
p self.foo # => private method `foo' called for #<Object:0x401c83b0> (NoMethodError)
def bar() 2 end
public :bar # visibility changed (all access allowed)
p bar # => 2
p sel... -
Module
# public(name) -> String | Symbol (18144.0) -
メソッドを public に設定します。
...メソッドを public に設定します。
引数なしのときは今後このクラスまたはモジュール定義内で新規に定義さ
れるメソッドをどんな形式でも呼び出せるように(public)設定します。
引数が与えられた時には引数によって指定......されたメソッドを public に設
定します。
可視性については d:spec/def#limit を参照して下さい。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
@raise NameErr......。
//emlist[例][ruby]{
def foo() 1 end
p foo # => 1
# the toplevel default is private
p self.foo # => private method `foo' called for #<Object:0x401c83b0> (NoMethodError)
def bar() 2 end
public :bar # visibility changed (all access allowed)
p bar # => 2
p sel... -
Module
# public(names) -> Array (18144.0) -
メソッドを public に設定します。
...メソッドを public に設定します。
引数なしのときは今後このクラスまたはモジュール定義内で新規に定義さ
れるメソッドをどんな形式でも呼び出せるように(public)設定します。
引数が与えられた時には引数によって指定......されたメソッドを public に設
定します。
可視性については d:spec/def#limit を参照して下さい。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
@raise NameErr......。
//emlist[例][ruby]{
def foo() 1 end
p foo # => 1
# the toplevel default is private
p self.foo # => private method `foo' called for #<Object:0x401c83b0> (NoMethodError)
def bar() 2 end
public :bar # visibility changed (all access allowed)
p bar # => 2
p sel... -
Module
# public(*name) -> self (18141.0) -
メソッドを public に設定します。
...メソッドを public に設定します。
引数なしのときは今後このクラスまたはモジュール定義内で新規に定義さ
れるメソッドをどんな形式でも呼び出せるように(public)設定します。
引数が与えられた時には引数によって指定......されたメソッドを public に設
定します。
可視性については d:spec/def#limit を参照して下さい。
@param name 0 個以上の String または Symbol を指定します。
@raise NameError 存在しないメソッド名を指定した場合に発生します。
//emlis......t[例][ruby]{
def foo() 1 end
p foo # => 1
# the toplevel default is private
p self.foo # => private method `foo' called for #<Object:0x401c83b0> (NoMethodError)
def bar() 2 end
public :bar # visibility changed (all access allowed)
p bar # => 2
p self.bar... -
NEWS for Ruby 3
. 0 . 0 (90.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...l:label-TypeProf] is experimentally bundled. It is a
type analysis tool for Ruby programs.
* Deprecation warnings are no longer shown by default (since Ruby 2.7.2).
Turn them on with `-W:deprecated` (or with `-w` to show other warnings too).
16345
* `$SAFE` and `$KCODE` are now n......it may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Dir
* Dir.glob and Dir.[] now sort the results by default, and accept the `sort:` keyword option. 8709
* ENV
* ENV.except has been added, which returns a hash excluding the given keys and their va......e the other modules and classes included or prepended the receiver. 9573
* Module#public, Module#protected, Module#private, Module#public_class_method, Module#private_class_method, toplevel "private" and "public" methods now accept single array argument with a list of method names. 17314
* M... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (78.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...merge は、hash.dup.update と同じ。
Hash#merge! は、Hash#update の別名 ((<ruby-talk:59777>)), ((<ruby-dev:19463>))
: ((<Hash#default_proc|Hash/default_proc>)) [new]
追加 ((<ruby-dev:17966>))
=== IO
: ((<IO/IO.sysopen>)) [new]
: ((<Socket#sysaccept|Socket/sysaccept>)) [new]
: ((<T......odule/private_method_defined?>)) [new]
: ((<Module#protected_method_defined?|Module/protected_method_defined?>)) [new]
: ((<Module#public_method_defined?|Module/public_method_defined?>)) [new]
: ((<Object#methods|Object/methods>)) [change]
: ((<Module#instance_methods|Module/instance_methods>)) [ch......(<組み込み関数/trap>)) [compat]
あるシグナルに対して、SIG_DFL や SIG_IGN が割り当てられていた場合、
文字列 "DEFAULT" や "IGNORE" を返すようになりました(以前は、nil を返
していました) ((<ruby-talk:67860>))
: ((<組み込み関数/syste... -
rexml
/ parsers / sax2parser (54.0) -
SAX2 と同等の API を持つストリーム式の XML パーサ。
...<!NOTATION foobar SYSTEM "http://example.org/foobar.dtd">
<!ENTITY % HTMLsymbol PUBLIC
"-//W3C//ENTITIES Symbols for XHTML//EN"
"xhtml-symbol.ent">
%HTMLsymbol;
]>
<root xmlns="http://example.org/default"
xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/ba......titydecl, "HTMLsymbol", "PUBLIC", "-//W3C//ENTITIES Symbols for XHTML//EN", "xhtml-symbol.ent", "%"]
# >> [:progress, 683]
# >> [:progress, 683]
# >> [:progress, 683]
# >> [:characters, "\n"]
# >> [:progress, 683]
# >> [:start_prefix_mapping, nil, "http://example.org/default"]
# >> [:start_prefix_ma......mple.org/foo"]
# >> [:start_prefix_mapping, "bar", "http://example.org/bar"]
# >> [:start_element, "http://example.org/default", "root", "root", {"xmlns"=>"http://example.org/default", "xmlns:foo"=>"http://example.org/foo", "xmlns:bar"=>"http://example.org/bar"}]
# >> [:progress, 683]
# >> [:cdata,... -
クラス/メソッドの定義 (48.0)
-
クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined
...list[例][ruby]{
def fact(n)
if n == 1 then
1
else
n * fact(n-1)
end
end
//}
文法:
def メソッド名 ['(' [arg0 ['=' default0]] ... [',' '*' rest_args [, post ...]] [',' key1: [val1]] ... [',' '**'kwrest] [',' '&' block_arg]`)']
式.. (body)
[rescu......メソッド定義
//emlist[例][ruby]{
def foo.test
print "this is foo\n"
end
//}
文法:
def 式 `.' 識別子 [`(' [引数 [`=' default]] ... [`,' `*' 引数 ]`)']
式..
[rescue [error_type,..] [=> evar] [then]
式..]..
[else......ては、Object#extend を参照して
ください。
===[a:limit] 呼び出し制限
メソッドは public、private、protected の三通りの
呼び出し制限を持ちます。
* public に設定されたメソッドは制限なしに呼び出せます。
* private に設定されたメ... -
ruby 1
. 8 . 4 feature (42.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...command table and manipulate other IPs (for reason of security).
# Now, a IP object can be controlled by only its master IP or the
# default IP.
#
# * ext/tk/lib/remote-tk.rb: add restriction to manipulate.
#
# * ext/tk/tcltklib.c (ip_is_slave_of_p): add TclTkIp#slave_o......armful to permit the access to ~/public_html by default.
# suggested by Hiroyuki Iwatsuki.
WEBrick::Config::FileHandler[:UserDir]のデフォルト値が
"public_html"からnilになり、意図せずにユーザディレクトリ
(/~user/public_html)以下が公開されるこ......: mkmf: find_executable() [compat]
#Thu Sep 22 23:36:24 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * lib/mkmf.rb (find_executable0): default path if environment is not
# set. [ruby-dev:27281]
実行ファイルを探索するときに環境変数 PATH がセットされて... -
NEWS for Ruby 3
. 1 . 0 (30.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ta#match_length が追加されました。 18172
* Method / UnboundMethod
* 新規メソッド
* Method#public?, Method#private?, Method#protected?, UnboundMethod#public?, UnboundMethod#private?, UnboundMethod#protected? が追加されました。 11689
* Module
* 変更され......ました。レシーバが既に引数をprependしている場合、継承ツリーを変更しません。 17423
* Module#private, Module#public, Module#protected, Module#module_functionが引数を返すようになりました。引数が1つでも渡されている場合、それが返......代わりにimport_methodsが追加されました。
== 標準添付ライブラリの更新(機能追加とバグ修正を除く)
* 以下のdefault gemsが更新されました。
* RubyGems 3.3.3
* base64 0.1.1
* benchmark 0.2.0
* bigdecimal 3.1.1
* bundler 2.3.3
* cg... -
Ruby用語集 (24.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...//blade.nagaokaut.ac.jp/ruby/
: bundled gem
標準添付ライブラリーの gem のうち、アンインストールできるもの。
→ default gem、標準添付ライブラリー
: Bundler
特定の Ruby アプリケーションで使用する gem とそのバージョンを Gemfile......uby では、文字列は
エンコーディング情報をもたないバイト列であった。
→エンコーディング
===[a:D] D
: default gem
標準添付ライブラリーの gem のうち、アンインストールできないもの。
→ bundled gem、標準添付ライブ......こともある。
: 可視性(メソッドの)
: method visibility
メソッドの呼び出し可能性。Ruby のメソッド可視性は public、private、protected の
三種類があるが、Java における private、protected とは全く異なるので注意が
必要である... -
rdoc (18.0)
-
RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。
...)。
: --title text
出力のタイトルを text に指定します。
: --visibility visibility
出力するメソッドの可視性を public、protected、private のいずれかから指定します。
指定しなかった場合は protected です。
: --markup markup
マーク......--root root
Root of the source tree documentation will be generated for. 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 w......合は、:section: を指定しなかった場合と同じように扱
われます。
//emlist{
# :category:
#
# This method is in the default category
def some_method
# ...
end
//}
:section: とは異なり、以降のドキュメントには影響しません。直後の要...