3464件ヒット
[1-100件を表示]
(0.137秒)
ライブラリ
- ビルトイン (2347)
-
bigdecimal
/ util (7) - e2mmap (30)
- etc (12)
-
fiddle
/ import (24) - forwardable (36)
- getoptlong (24)
- json (60)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) -
net
/ http (12) - openssl (12)
- optparse (168)
- pp (24)
- rake (48)
-
rdoc
/ context (72) -
rdoc
/ markup (12) -
rdoc
/ parser (12) -
rdoc
/ stats (12) -
rdoc
/ top _ level (24) -
rexml
/ document (24) -
rexml
/ streamlistener (12) -
rubygems
/ remote _ fetcher (12) - set (9)
- timeout (16)
- tsort (47)
- uri (24)
-
webrick
/ httpauth / userdb (12) -
webrick
/ httpresponse (12) -
webrick
/ httpservlet / abstract (72) -
webrick
/ httputils (96) -
win32
/ registry (12) - win32ole (60)
クラス
-
ARGF
. class (764) - BasicObject (144)
- BigDecimal (12)
- Class (24)
- Complex (12)
- Date (12)
- DateTime (12)
-
Etc
:: Passwd (12) - Exception (24)
- FalseClass (24)
-
Gem
:: RemoteFetcher (12) - GetoptLong (24)
- IO (12)
- Integer (12)
- Method (95)
- Module (520)
- NameError (10)
-
Net
:: HTTPResponse (12) - NilClass (170)
- Object (324)
- OptionParser (168)
-
RDoc
:: Context (72) -
RDoc
:: Markup (12) -
RDoc
:: Parser (12) -
RDoc
:: Stats (12) -
RDoc
:: TopLevel (24) -
REXML
:: CData (24) - Range (12)
- Rational (12)
- Regexp (24)
-
RubyVM
:: InstructionSequence (12) - Set (12)
- String (12)
- Struct (12)
- Thread (24)
-
Thread
:: Backtrace :: Location (48) - Time (12)
- TracePoint (36)
- TrueClass (24)
-
URI
:: Generic (24) - UnboundMethod (36)
-
WEBrick
:: HTTPResponse (12) -
WEBrick
:: HTTPServlet :: AbstractServlet (72) -
WEBrick
:: HTTPUtils :: FormData (96) -
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (24) -
WIN32OLE
_ TYPELIB (24) -
Win32
:: Registry :: PredefinedKey (12)
モジュール
- Enumerable (96)
- Exception2MessageMapper (30)
-
Fiddle
:: Importer (24) - Forwardable (36)
-
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (16)
-
REXML
:: StreamListener (12) -
Rake
:: TaskManager (24) - TSort (47)
-
WEBrick
:: HTTPAuth :: UserDB (12)
キーワード
- ! (12)
- != (12)
- & (12)
- < (12)
- <=> (12)
- == (24)
- === (12)
- =~ (7)
- Fail (6)
- Raise (6)
- [] (12)
- ^ (12)
-
_ _ send _ _ (24) -
_ dump (12) -
absolute
_ path (12) - accept (12)
-
add
_ class (12) -
add
_ class _ or _ module (24) -
add
_ module (12) -
add
_ special (12) - arity (24)
-
attr
_ writer (4) -
auth
_ type (12) - autoload (12)
- backtrace (12)
-
base
_ label (12) - bind (12)
- binmode (12)
- binmode? (12)
-
callee
_ id (12) -
class
_ eval (12) -
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
class
_ variables (12) - classes (12)
- classify (12)
- codepoints (14)
- component (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ missing (12) -
const
_ source _ location (12) - constants (12)
-
def
_ delegator (12) -
def
_ exception (6) -
def
_ instance _ delegator (12) -
default
_ event _ sources (12) -
default
_ port (12) -
define
_ method (24) -
define
_ singleton _ method (24) -
define
_ task (12) -
defined
_ class (12) - display (12)
-
do
_ DELETE (12) -
do
_ GET (12) -
do
_ HEAD (12) -
do
_ OPTIONS (12) -
do
_ POST (12) -
do
_ PUT (12) - each (36)
-
each
_ char (24) -
each
_ classmodule (12) -
each
_ codepoint (24) -
each
_ data (12) -
each
_ line (48) -
each
_ strongly _ connected _ component (12) -
each
_ strongly _ connected _ component _ from (23) - entitydecl (12)
- error (12)
- error? (12)
-
external
_ encoding (12) - fail (6)
- file (12)
- filename (24)
- filename= (12)
- fileno (12)
-
find
_ local _ symbol (12) -
fixed
_ encoding? (12) - getbyte (12)
- getc (12)
- gets (36)
- handler= (12)
-
http
_ version (12) - include (12)
- include? (12)
- included (12)
- inherited (12)
- initialize (12)
-
initialize
_ classes _ and _ modules (12) -
initialize
_ copy (12) -
inplace
_ mode (12) -
inplace
_ mode= (12) - inspect (84)
-
instance
_ delegate (12) -
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) -
instance
_ methods (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variables (12) - intern (12)
-
internal
_ encoding (12) -
is
_ a? (12) -
kind
_ of? (12) - lineno (12)
- lineno= (12)
- lines (42)
- list (12)
- max (24)
-
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (12) -
method
_ undefined (12) - methods (12)
- min (48)
-
module
_ eval (12) - name (24)
- name= (12)
- nil? (12)
-
num
_ classes (12) -
ole
_ classes (12) -
ole
_ type (12) -
ole
_ types (12) - on (144)
-
original
_ name (24) -
parse
_ files _ matching (12) - path (12)
- pathmap (12)
- pos (12)
-
pretty
_ print (12) -
pretty
_ print _ cycle (12) - print (12)
- printf (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
public
_ class _ method (24) -
public
_ constant (12) -
public
_ method (12) -
public
_ method _ defined? (12) - puts (12)
-
rake
_ extension (12) - rationalize (24)
- read (12)
-
read
_ nonblock (12) - readbyte (24)
- readchar (12)
- readline (36)
- readlines (36)
- readpartial (12)
- receiver (22)
- refine (12)
- reject (12)
-
remove
_ class _ variable (12) -
remove
_ instance _ variable (12) - request (12)
-
respond
_ to? (12) -
respond
_ to _ missing? (12) - rewind (12)
- seek (12)
-
set
_ encoding (36) -
set
_ trace _ func (12) -
singleton
_ class (12) -
singleton
_ class? (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - skip (12)
-
sort
_ by (24) -
source
_ location (12) - struct (12)
-
super
_ method (11) - superclass (12)
- tell (12)
- timeout (16)
-
to
_ a (60) -
to
_ ary (12) -
to
_ bn (12) -
to
_ c (12) -
to
_ d (7) -
to
_ f (12) -
to
_ h (12) -
to
_ i (24) -
to
_ int (12) -
to
_ io (12) -
to
_ json (168) -
to
_ json _ raw _ object (12) -
to
_ r (12) -
to
_ s (108) -
to
_ str (12) -
to
_ write _ io (12) -
tsort
_ each (12) - uclass (12)
- unbind (12)
- union (12)
- value (24)
- write (12)
- | (12)
検索結果
先頭5件
-
Win32
:: Registry :: PredefinedKey # class (24102.0) -
@todo
@todo -
TracePoint
# defined _ class -> Class | module (15351.0) -
メソッドを定義したクラスかモジュールを返します。
...す。
//emlist[例][ruby]{
class C; def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。
//emlist[例][ruby]......{
module M; def foo; end; end
class C; include M; end;
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => M
end.enable do
C.new.foo
end
//}
[注意] 特異メソッドを実行した場合は TracePoint#defined_class は特異クラ
スを返します。また、Kernel.#set_trace_fun......スではなく元のクラスを返します。
//emlist[例][ruby]{
class C; def self.foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => #<Class:C>
end.enable do
C.foo
end
//}
Kernel.#set_trace_func と TracePoint の上記の差分に注意して
ください。
@s... -
Class
# superclass -> Class | nil (15320.0) -
自身のスーパークラスを返します。
...//emlist[例][ruby]{
File.superclass #=> IO
IO.superclass #=> Object
class Foo; end
class Bar < Foo; end
Bar.superclass #=> Foo
Object.superclass #=> BasicObject
//}
ただし BasicObject.superclass は nil を返します。
//emlist[例][ruby]{
BasicObject.......superclass #=> nil
//}......superclass #=> nil
//}
@see Class#subclasses... -
ARGF
. class # internal _ encoding -> Encoding | nil (15313.0) -
ARGF から読み込んだ文字列の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
...nil を返します。
まだ読み込み処理を始めていない場合は Encoding.default_external を返します。
ARGF.class#set_encoding で設定します。
例:
# $ ruby -Eutf-8 test.rb
# test.rb
ARGF.internal_encoding # => #<Encoding:UTF-8>
ARGF.set_encoding('u......tf-8','ascii')
ARGF.internal_encoding # => #<Encoding:US-ASCII>
例:
ARGF.binmode
ARGF.internal_encoding # => nil
@see IO, ARGF.class#external_encoding... -
Class
# inherited(subclass) -> () (15237.0) -
クラスのサブクラスが定義された時、新しく生成されたサブクラスを引数 にインタプリタから呼び出されます。このメソッドが呼ばれるタイミングは クラス定義文の実行直前です。
...ubclass プログラム内で新たに定義された自身のサブクラスです。
//emlist[例][ruby]{
class Foo
def Foo.inherited(subclass)
puts "class \"#{self}\" was inherited by \"#{subclass}\""
end
end
class Bar < Foo
puts "executing class body"
end
# => class "Foo" was inherit......ed by "Bar"
# executing class body
//}... -
Object
# singleton _ class -> Class (12339.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>
nil.singleton_class #=> NilClass
//}
@see Object#class... -
Object
# define _ singleton _ method(symbol) { . . . } -> Symbol (12249.0) -
self に特異メソッド name を定義します。
...String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
class << 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 (12249.0) -
self に特異メソッド name を定義します。
...String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
class << 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!"
//}... -
Module
# class _ variable _ defined?(name) -> bool (12232.0) -
name で与えられた名前のクラス変数がモジュールに存在する場合 true を 返します。
...@param name Symbol か String を指定します。
//emlist[例][ruby]{
class Fred
@@foo = 99
end
Fred.class_variable_defined?(:@@foo) #=> true
Fred.class_variable_defined?(:@@bar) #=> false
Fred.class_variable_defined?('@@foo') #=> true
Fred.class_variable_defined?('@@bar') #=> fals...