233件ヒット
[1-100件を表示]
(0.058秒)
種類
- インスタンスメソッド (120)
- 定数 (48)
- 文書 (29)
- 特異メソッド (24)
- クラス (12)
ライブラリ
- ビルトイン (60)
- prettyprint (12)
- psych (48)
-
rdoc
/ context (48) -
rdoc
/ parser / ruby (12) -
rdoc
/ top _ level (24)
クラス
- Encoding (24)
- Object (36)
- PrettyPrint (12)
-
Psych
:: Handler (12) -
Psych
:: Nodes :: Scalar (24) -
RDoc
:: Context (48) -
RDoc
:: Parser :: Ruby (12) -
RDoc
:: TopLevel (24)
キーワード
- Emitter (12)
- MACCYRILLIC (12)
- MacCyrillic (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) -
SINGLE
_ QUOTED (12) -
add
_ class (12) -
add
_ class _ or _ module (24) -
add
_ module (12) -
define
_ singleton _ method (24) -
find
_ local _ symbol (12) - new (12)
- scalar (12)
-
set
_ visibility _ for (12) -
singleline
_ format (12) -
singleton
_ methods (12)
検索結果
先頭5件
- RDoc
:: Parser :: Ruby :: SINGLE -> "<<" - Psych
:: Nodes :: Scalar :: SINGLE _ QUOTED -> Integer - PrettyPrint
. singleline _ format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object - Object
# define _ singleton _ method(symbol) { . . . } -> Symbol - Object
# define _ singleton _ method(symbol , method) -> Symbol
-
RDoc
:: Parser :: Ruby :: SINGLE -> "<<" (21101.0) -
RDoc::SingleClass type
...RDoc::SingleClass type... -
Psych
:: Nodes :: Scalar :: SINGLE _ QUOTED -> Integer (9117.0) -
single quoted style を表します。
...single quoted style を表します。
@see Psych::Nodes::Scalar.new,
Psych::Nodes::Scalar#style,
Psych::Handler#scalar... -
PrettyPrint
. singleline _ format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object (9100.0) -
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 PrettyPrint.format に似ていますが、改行しません。
...PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
PrettyPrint.format に似ていますが、改行しません。
引数 maxwidth, newline と genspace は無視されます。ブロック中の breakable の実行は、
改行せずに text... -
Object
# define _ singleton _ method(symbol) { . . . } -> Symbol (6300.0) -
self に特異メソッド name を定義します。
...@param symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
c......lass << self
def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
Object
# define _ singleton _ method(symbol , method) -> Symbol (6300.0) -
self に特異メソッド name を定義します。
...@param symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
c......lass << self
def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
RDoc
:: TopLevel # find _ local _ symbol(name) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule | RDoc :: AnyMethod | RDoc :: Alias | RDoc :: Attr | RDoc :: Constant (6300.0) -
クラス、モジュール、メソッド、定数、属性、alias、ファイルから name で指定したものを返します。見つからなかった場合は nil を返します。
クラス、モジュール、メソッド、定数、属性、alias、ファイルから name で指定したものを返します。見つからなかった場合は nil を返します。 -
Object
# singleton _ methods(inherited _ too = true) -> [Symbol] (6200.0) -
そのオブジェクトに対して定義されている特異メソッド名 (public あるいは protected メソッド) の一覧を返します。
...ソッド)などです。
singleton_methods(false) は、Object#methods(false) と同じです。
@param inherited_too 継承した特異メソッドを含める場合は真を、
そうでない場合は偽を指定します。
//emlist[例1][ruby]{
Parent = Class.new
class......ソッドの一覧を得る。
p obj.singleton_methods(false)
p obj.methods(false)
p Foo.singleton_methods(false)
#実行結果
[:protected_self, :public_self]
[:protected_self, :public_self]
[:protected_class_foo, :public_class_foo]
//}
//emlist[例2][ruby]{
# あるオブジェクトの特異......るよう true を指定したが、
# Object のクラスメソッドは一覧から排除している。
p obj.singleton_methods(true)
p Foo.singleton_methods(true) - Object.singleton_methods(true)
#実行結果
[:protected_self, :public_self, :protected_bar, :public_bar]
[:protected_class_foo,... -
RDoc
:: Context # set _ visibility _ for(methods , visibility , singleton = false) -> () (6200.0) -
methods で指定した RDoc::AnyMethod、RDoc::Attr の内、 singleton で指定した条件と一致するメソッドすべての可視性を visibility に設定します。
...た RDoc::AnyMethod、RDoc::Attr の内、
singleton で指定した条件と一致するメソッドすべての可視性を visibility
に設定します。
@param methods RDoc::AnyMethod、RDoc::Attr オブジェクトの配
列を指定します。
@param visibility 可視性を......:public, :protected, :private の内のいずれか
で指定します。
@param singleton 特異メソッドの可視性を変更する場合は true、そうでない
場合は false を指定します。... -
Encoding
:: MACCYRILLIC -> Encoding (6106.0) -
MacCyrillic エンコーディング。
...MacCyrillic エンコーディング。
Mac OS で使われる 8bit single-byte エンコーディングで、
キリル文字を取り扱うものです。
@see https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding...