種類
ライブラリ
- English (2)
- ビルトイン (284)
- csv (7)
- delegate (1)
- digest (1)
- e2mmap (9)
- erb (4)
- etc (3)
-
fiddle
/ import (2) - forwardable (4)
- getoptlong (2)
-
irb
/ extend-command (1) - json (19)
-
json
/ add / bigdecimal (1) -
json
/ add / complex (1) -
json
/ add / date (1) -
json
/ add / date _ time (1) -
json
/ add / exception (1) -
json
/ add / range (1) -
json
/ add / rational (1) -
json
/ add / regexp (1) -
json
/ add / struct (1) -
json
/ add / time (1) - logger (1)
-
minitest
/ unit (1) - monitor (1)
-
mutex
_ m (3) -
net
/ http (4) -
net
/ imap (1) -
net
/ pop (2) - objspace (4)
- openssl (89)
- optparse (16)
- pp (3)
- psych (3)
- rake (4)
- rdoc (1)
-
rdoc
/ code _ object (1) -
rdoc
/ context (7) -
rdoc
/ generator / json _ index (1) -
rdoc
/ known _ classes (1) -
rdoc
/ markup (1) -
rdoc
/ parser (1) -
rdoc
/ stats (2) -
rdoc
/ top _ level (4) - resolv (3)
-
rexml
/ document (2) -
rexml
/ streamlistener (1) -
ripper
/ filter (1) -
rubygems
/ digest / digest _ adapter (1) -
rubygems
/ ext / builder (1) -
rubygems
/ gem _ openssl (1) -
rubygems
/ remote _ fetcher (1) -
rubygems
/ version (1) - set (3)
-
shell
/ command-processor (1) - singleton (1)
- socket (6)
- thread (1)
- timeout (4)
- tracer (7)
- tsort (5)
- uri (2)
-
webrick
/ httpauth / authenticator (2) -
webrick
/ httpauth / userdb (1) -
webrick
/ httpresponse (1) -
webrick
/ httpservlet / abstract (6) -
webrick
/ httpservlet / filehandler (1) -
webrick
/ httpstatus (1) -
webrick
/ httputils (8) -
win32
/ registry (19) - win32ole (8)
クラス
-
ARGF
. class (63) - Array (3)
- BasicObject (12)
- BigDecimal (1)
- CSV (7)
- Class (7)
- Complex (1)
- Date (1)
- DateTime (1)
- Dir (6)
- ERB (3)
-
Enumerator
:: Lazy (1) -
Etc
:: Passwd (2) - Exception (2)
- FalseClass (5)
- File (5)
-
Gem
:: DigestAdapter (1) -
Gem
:: Ext :: Builder (1) -
Gem
:: RemoteFetcher (1) -
Gem
:: Version (1) - GetoptLong (2)
- Hash (4)
- IO (5)
- Integer (1)
-
JSON
:: Parser (2) -
JSON
:: State (2) - Method (15)
-
MiniTest
:: Unit :: TestCase (1) - Module (52)
-
Net
:: HTTP (2) -
Net
:: HTTPResponse (2) -
Net
:: IMAP (1) -
Net
:: POP3 (2) - NilClass (12)
- Object (42)
-
OpenSSL
:: ASN1 :: ASN1Data (3) -
OpenSSL
:: ASN1 :: BMPString (2) -
OpenSSL
:: ASN1 :: BitString (2) -
OpenSSL
:: ASN1 :: Boolean (1) -
OpenSSL
:: ASN1 :: Enumerated (2) -
OpenSSL
:: ASN1 :: GeneralString (2) -
OpenSSL
:: ASN1 :: GeneralizedTime (2) -
OpenSSL
:: ASN1 :: GraphicString (2) -
OpenSSL
:: ASN1 :: IA5String (2) -
OpenSSL
:: ASN1 :: ISO64String (2) -
OpenSSL
:: ASN1 :: Integer (2) -
OpenSSL
:: ASN1 :: Null (1) -
OpenSSL
:: ASN1 :: NumericString (2) -
OpenSSL
:: ASN1 :: ObjectId (2) -
OpenSSL
:: ASN1 :: OctetString (2) -
OpenSSL
:: ASN1 :: PrintableString (2) -
OpenSSL
:: ASN1 :: Sequence (1) -
OpenSSL
:: ASN1 :: Set (2) -
OpenSSL
:: ASN1 :: T61String (2) -
OpenSSL
:: ASN1 :: UTCTime (2) -
OpenSSL
:: ASN1 :: UTF8String (2) -
OpenSSL
:: ASN1 :: UniversalString (2) -
OpenSSL
:: ASN1 :: VideotexString (2) - OptionParser (16)
- PP (1)
-
RDoc
:: CodeObject (1) -
RDoc
:: Context (7) -
RDoc
:: Generator :: JsonIndex (1) -
RDoc
:: Markup (1) -
RDoc
:: Parser (1) -
RDoc
:: Stats (2) -
RDoc
:: TopLevel (4) -
REXML
:: CData (2) - Range (2)
- Rational (1)
- Regexp (1)
-
Resolv
:: DNS (3) -
RubyVM
:: InstructionSequence (1) - Set (1)
-
Shell
:: CommandProcessor (1) - Socket (3)
- String (1)
- Struct (5)
- Thread (3)
-
Thread
:: Backtrace :: Location (4) - Time (1)
- TracePoint (4)
- Tracer (7)
- TrueClass (5)
-
URI
:: Generic (2) - UnboundMethod (4)
-
WEBrick
:: HTTPResponse (1) -
WEBrick
:: HTTPServlet :: AbstractServlet (6) -
WEBrick
:: HTTPServlet :: FileHandler (1) -
WEBrick
:: HTTPUtils :: FormData (8) -
WIN32OLE
_ EVENT (1) -
WIN32OLE
_ TYPE (4) -
WIN32OLE
_ TYPELIB (3) -
Win32
:: Registry (9) -
Win32
:: Registry :: PredefinedKey (1)
モジュール
-
ERB
:: DefMethod (1) - Enumerable (10)
- Exception2MessageMapper (9)
-
Fiddle
:: Importer (2) - Forwardable (4)
-
Gem
:: SSL (1) -
IRB
:: ExtendCommandBundle (1) - JSON (3)
-
JSON
:: Generator :: GeneratorMethods :: FalseClass (1) -
JSON
:: Generator :: GeneratorMethods :: NilClass (1) -
JSON
:: Generator :: GeneratorMethods :: Object (1) -
JSON
:: Generator :: GeneratorMethods :: String (1) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (1) - Kernel (12)
- Marshal (2)
-
Mutex
_ m (2) - ObjectSpace (12)
-
OpenSSL
:: ASN1 (43) - Psych (1)
- RDoc (2)
-
REXML
:: StreamListener (1) -
Rake
:: TaskManager (2) -
Socket
:: Constants (3) - TSort (5)
- Timeout (1)
-
WEBrick
:: HTTPAuth :: Authenticator (1) -
WEBrick
:: HTTPAuth :: ProxyAuthenticator (1) -
WEBrick
:: HTTPAuth :: UserDB (1) -
WEBrick
:: HTTPStatus (1) -
Win32
:: Registry :: Constants (9)
キーワード
- ! (1)
- != (1)
-
$ ERROR _ INFO (1) -
$ ERROR _ POSITION (1) -
$ FILENAME (1) - & (3)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (1) - < (1)
- <=> (1)
- == (2)
- === (1)
- APOP (1)
- ARGF (1)
- ASN1 (1)
- Application (1)
- AuthException (2)
- BMPString (2)
- BasicObject (1)
- BitString (2)
- Boolean (1)
-
CLASS
_ MODIFIERS (1) -
CODE
_ CLASS _ TO _ OBJ (1) - ConditionVariable (1)
-
DIGEST
_ SHA1 (1) - DelegateClass (1)
-
EVENT
_ SYMBOL (1) - Enumerated (2)
- Error (1)
- FALSE (1)
- Fail (2)
- FalseClass (2)
- Filter (1)
- GeneralString (2)
- GeneralizedTime (2)
- GraphicString (2)
-
HKEY
_ CLASSES _ ROOT (2) -
HKEY
_ CURRENT _ CONFIG (2) -
HKEY
_ CURRENT _ USER (2) -
HKEY
_ DYN _ DATA (2) -
HKEY
_ LOCAL _ MACHINE (2) -
HKEY
_ PERFORMANCE _ DATA (2) -
HKEY
_ PERFORMANCE _ NLSTEXT (2) -
HKEY
_ PERFORMANCE _ TEXT (2) -
HKEY
_ USERS (2) - IA5String (2)
-
IPPROTO
_ TP (2) -
IPV6
_ RECVTCLASS (2) -
IPV6
_ TCLASS (2) - ISO64String (2)
- Integer (2)
-
KNOWN
_ CLASSES (1) - Location (1)
- Marshal フォーマット (1)
- Method (1)
- MonitorMixin (1)
-
Mutex
_ m (1) -
NEWS for Ruby 2
. 0 . 0 (1) - NIL (1)
- NilClass (2)
- Null (1)
- NumericString (2)
- ObjectId (2)
- OctetString (2)
- Options (1)
-
PASSTHROUGH
_ EXCEPTIONS (1) - Passwd (1)
- PrintableString (2)
- Proxy (1)
- RCLASS (1)
- RMODULE (1)
- Raise (2)
- Requirement (1)
- Sequence (1)
- Set (2)
- Singleton (1)
- String (1)
- T61String (2)
- TRUE (1)
- TYPES (1)
- TrueClass (3)
- UTCTime (2)
- UTF8String (2)
- UnboundMethod (1)
- UniversalString (2)
- VideotexString (2)
- Visitors (1)
- [] (6)
- ^ (3)
-
_ _ send _ _ (2) -
_ dump (1) -
_ load (1) -
absolute
_ path (1) - accept (2)
-
add
_ authenticator (1) -
add
_ class (1) -
add
_ class _ or _ module (2) -
add
_ filter (2) -
add
_ module (1) -
add
_ special (1) -
add
_ trace _ func (1) -
all
_ classes _ and _ modules (1) - allocate (1)
- ancestors (1)
-
append
_ features (2) - arity (2)
-
auth
_ type (1) - autoload (2)
- autoload? (1)
- backtrace (1)
-
base
_ label (1) - bind (1)
-
boot
_ defclass (1) - bytes (2)
- call (2)
-
callee
_ id (1) - chars (1)
- class (2)
-
class
_ eval (2) -
class
_ exec (1) -
class
_ name (1) -
class
_ variable _ get (1) -
class
_ variable _ set (1) -
class
_ variables (1) - classes (1)
- classify (1)
- classname (1)
- clone (1)
- codepoints (2)
- component (1)
-
const
_ defined? (1) -
const
_ get (1) -
const
_ missing (1) -
const
_ source _ location (1) - constants (2)
-
count
_ objects (1) -
count
_ objects _ size (1) -
count
_ tdata _ objects (1) -
create
_ id (1) -
create
_ id= (1) - decode (1)
-
def
_ builtin _ commands (1) -
def
_ class (1) -
def
_ delegator (1) -
def
_ erb _ method (1) -
def
_ exception (2) -
def
_ extend _ command (1) -
def
_ instance _ delegator (1) -
def
_ module (1) -
default
_ event _ sources (1) -
default
_ port (1) -
define
_ aliases (1) -
define
_ finalizer (2) -
define
_ method (2) -
define
_ singleton _ method (2) -
define
_ task (1) -
defined
_ class (1) - delegate (1)
- display (1)
-
do
_ DELETE (1) -
do
_ GET (1) -
do
_ HEAD (1) -
do
_ OPTIONS (1) -
do
_ POST (1) -
do
_ PUT (1) -
drb
/ extservm (1) - dump (2)
- each (3)
-
each
_ byte (2) -
each
_ char (1) -
each
_ classmodule (1) -
each
_ codepoint (2) -
each
_ data (1) -
each
_ entry (2) -
each
_ line (3) -
each
_ object (4) -
each
_ resource (1) -
each
_ strongly _ connected _ component (1) -
each
_ strongly _ connected _ component _ from (1) - entitydecl (1)
- error (1)
- error? (1)
- extend (1)
-
external
_ encoding (1) - fail (2)
- filename (2)
- filename= (1)
- fileno (1)
-
find
_ class _ named (1) -
find
_ class _ path (1) -
find
_ local _ symbol (1) -
for
_ fd (1) -
from
_ state (1) - getbyte (1)
- getc (1)
- getresource (1)
- getresources (1)
- gets (3)
- handler= (1)
-
http
_ version (1) -
include
_ class _ new (1) - inherited (1)
- initialize (1)
-
initialize
_ classes _ and _ modules (1) -
initialize
_ copy (1) -
inplace
_ mode (1) -
inplace
_ mode= (1) -
ins
_ methods _ i (1) -
ins
_ methods _ priv _ i (1) -
ins
_ methods _ prot _ i (1) - inspect (7)
-
instance
_ delegate (1) -
instance
_ eval (2) -
instance
_ exec (1) -
instance
_ method (1) -
instance
_ methods (1) -
instance
_ of? (1) -
instance
_ variable _ defined? (1) -
instance
_ variable _ get (1) -
instance
_ variables (1) - intern (1)
-
internal
_ encoding (1) -
irb
/ completion (1) -
is
_ a? (1) -
json
_ creatable? (1) -
kind
_ of? (1) - lineno (1)
- lines (5)
- list (1)
-
marshal
_ dump (1) -
marshal
_ load (1) - max (2)
- merge (2)
-
method
_ added (1) -
method
_ defined? (1) -
method
_ id (1) -
method
_ missing (1) -
method
_ removed (1) -
method
_ undefined (1) - methods (1)
- min (2)
-
minitest
/ unit (1) -
module
_ eval (2) -
module
_ exec (1) - name (3)
- name= (1)
- nesting (1)
- new (63)
-
num
_ classes (1) -
num
_ classes= (1) -
object
_ group (1) -
ole
_ classes (2) -
ole
_ type (1) -
ole
_ types (1) - on (14)
- open (12)
-
original
_ name (2) - owner (2)
- parameters (1)
- parse (1)
-
parse
_ files _ matching (1) - path (2)
- pathmap (1)
- pos (1)
-
prepend
_ features (1) -
pretty
_ print (1) -
pretty
_ print _ cycle (1) - print (1)
- printf (1)
- private (4)
-
private
_ class _ method (2) -
private
_ constant (1) -
private
_ method _ defined? (1) -
protected
_ method _ defined? (1) -
proxy
_ class? (1) -
public
_ class _ method (2) -
public
_ constant (1) -
public
_ method (1) -
public
_ method _ defined? (1) - putc (1)
- puts (1)
- raise (1)
-
rake
_ extension (1) - rationalize (2)
-
rb
_ catch (1) -
rb
_ class _ allocate _ instance (1) -
rb
_ class _ boot (1) -
rb
_ class _ inherited (1) -
rb
_ class _ initialize (1) -
rb
_ class _ instance _ methods (1) -
rb
_ class _ new _ instance (1) -
rb
_ class _ path (1) -
rb
_ class _ private _ instance _ methods (1) -
rb
_ class _ protected _ instance _ methods (1) -
rb
_ class _ real (1) -
rb
_ class _ s _ new (1) -
rb
_ class _ superclass (1) -
rb
_ clear _ cache _ by _ class (1) -
rb
_ define _ class (1) -
rb
_ define _ class _ under (1) -
rb
_ define _ class _ variable (1) -
rb
_ is _ class _ id (1) -
rb
_ path2class (1) -
rb
_ set _ class _ path (1) -
rb
_ singleton _ class (1) -
rb
_ singleton _ class _ attached (1) -
rb
_ singleton _ class _ clone (1) -
rb
_ singleton _ class _ new (1) - rdoc (1)
-
rdoc
/ generator (1) -
rdoc
/ generator / json _ index (1) -
rdoc
/ parser / c (1) -
reachable
_ objects _ from (1) - read (2)
-
read
_ nonblock (1) - readbyte (2)
- readchar (1)
- readline (3)
- readlines (3)
- readpartial (1)
- receiver (1)
- reject (2)
-
remove
_ class _ variable (1) -
remove
_ classes _ and _ modules (1) -
remove
_ const (1) -
remove
_ handler (1) -
remove
_ instance _ variable (1) -
remove
_ method (1) - replace (1)
- request (1)
-
respond
_ to? (1) -
respond
_ to _ missing? (1) -
rexml
/ parsers / streamparser (1) -
ruby 1
. 6 feature (1) -
ruby 1
. 8 . 2 feature (1) -
ruby 1
. 8 . 3 feature (1) -
ruby 1
. 8 . 4 feature (1) -
ruby 1
. 9 feature (1) -
safe
_ load (1) - seek (1)
- send (2)
-
set
_ encoding (3) -
set
_ get _ line _ procs (2) -
set
_ trace _ func (2) -
singleton
_ class (1) -
singleton
_ class? (1) -
singleton
_ method (1) -
singleton
_ method _ added (1) -
singleton
_ method _ removed (1) -
singleton
_ method _ undefined (1) -
singleton
_ methods (1) -
socket
_ type (1) -
sort
_ by (2) -
source
_ location (1) - stat (1)
-
strongly
_ connected _ components (1) - struct (1)
- superclass (1)
-
tag
_ class (1) -
tag
_ class= (1) - tell (1)
-
test
/ unit (1) - timeout (3)
-
to
_ a (6) -
to
_ ary (3) -
to
_ bn (1) -
to
_ c (1) -
to
_ f (1) -
to
_ h (2) -
to
_ hash (1) -
to
_ i (2) -
to
_ int (1) -
to
_ io (1) -
to
_ json (14) -
to
_ json _ raw _ object (1) -
to
_ proc (2) -
to
_ r (1) -
to
_ regexp (1) -
to
_ s (9) -
to
_ set (2) -
to
_ str (1) -
to
_ write _ io (1) -
trace
_ object _ allocations (1) - tracer (1)
- traverse (1)
- tsort (2)
-
tsort
_ each (1) - uclass (1)
- uclass= (1)
- unbind (1)
-
undef
_ method (1) -
undefine
_ finalizer (1) - union (1)
- value (2)
- write (1)
- yaml (1)
-
yaml
_ tag (1) - | (3)
- パターンマッチ (1)
- リテラル (1)
- 制御構造 (1)
- 正規表現 (1)
- 演算子式 (1)
検索結果
先頭5件
-
Class
# inherited(subclass) -> () (81709.0) -
クラスのサブクラスが定義された時、新しく生成されたサブクラスを引数 にインタプリタから呼び出されます。このメソッドが呼ばれるタイミングは クラス定義文の実行直前です。
クラスのサブクラスが定義された時、新しく生成されたサブクラスを引数
にインタプリタから呼び出されます。このメソッドが呼ばれるタイミングは
クラス定義文の実行直前です。
@param subclass プログラム内で新たに定義された自身のサブクラスです。
//emlist[例][ruby]{
class Foo
def Foo.inherited(subclass)
puts "class \"#{self}\" was inherited by \"#{subclass}\""
end
end
class Bar < Foo
puts "executing class... -
Class
# allocate -> object (81319.0) -
自身のインスタンスを生成して返します。生成したオブジェクトは 自身のインスタンスであること以外には何も特性を持ちません。
自身のインスタンスを生成して返します。生成したオブジェクトは
自身のインスタンスであること以外には何も特性を持ちません。
//emlist[例][ruby]{
klass = Class.new do
def initialize(*args)
@initialized = true
end
def initialized?
@initialized || false
end
end
klass.allocate.initialized? #=> false
//} -
Class
# json _ creatable? -> bool (81301.0) -
シリアライズされた JSON 形式の文字列から、インスタンスを作成するのにこのクラスを使用できる場合は 真を返します。そうでない場合は、偽を返します。
シリアライズされた JSON 形式の文字列から、インスタンスを作成するのにこのクラスを使用できる場合は
真を返します。そうでない場合は、偽を返します。
このメソッドが真を返すクラスは json_create というメソッドを実装していなければなりません。
また json_create の第一引数は必要なデータを含むハッシュを期待しています。
//emlist[例][ruby]{
require "json"
String.json_creatable? # => true
Dir.json_creatable? # => false
//} -
tsort (78379.0)
-
tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。
tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。
=== Example
//emlist[][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end
{1=>[2, 3], 2=>[3], 3=>[], 4=>[]}.tsort
#=> [3, 2, 1, 4]
{1=>[2], 2=>[3, 4... -
test
/ unit (78073.0) -
ユニットテストを行うためのライブラリです。
ユニットテストを行うためのライブラリです。
このライブラリは 2.2.0 からbundled gem(gemファイルのみを同梱)になりまし
た。詳しい内容は下記のプロジェクトページを参照してください。
* Test::Unit - Ruby用単体テストフレームワーク: https://test-unit.github.io/
なお、2.2.0より前のtest/unit は当時バンドルしていた minitest/unit を使って再実装し
ていましたが、上記のtest/unitと完全な互換性がある訳ではありません。
Rubyのテスティングフレームワークの歴史については以下が詳しくまと... -
tracer (78019.0)
-
実行トレース出力をとる機能を提供します。
実行トレース出力をとる機能を提供します。
使い方は大きく分けて2通り。
ひとつは以下のようにコマンドラインから Kernel.#require する方法です。
hoge.rb の実行をすべてトレース出力します。
ruby -rtracer hoge.rb
もうひとつはソースからrequireする方法です。
require 'tracer'
とした後
Tracer.on
によりトレース出力を有効にします。
Tracer.off
によりトレース出力を無効にします。
また、ブロック付きで Tracer.on を呼び出すと、そのブロック内のみ
トレースを出力します... -
Class
. new(superclass = Object) -> Class (63997.0) -
新しく名前の付いていない superclass のサブクラスを生成します。
新しく名前の付いていない superclass のサブクラスを生成します。
名前のないクラスは、最初に名前を求める際に代入されている定数名を検
索し、見つかった定数名をクラス名とします。
//emlist[例][ruby]{
p foo = Class.new # => #<Class:0x401b90f8>
p foo.name # => nil
Foo = foo # ここで p foo すれば "Foo" 固定
Bar = foo
p foo.name # => "Bar" ("Foo" になるか "Bar" になるかは... -
Class
. new(superclass = Object) {|klass| . . . } -> Class (63997.0) -
新しく名前の付いていない superclass のサブクラスを生成します。
新しく名前の付いていない superclass のサブクラスを生成します。
名前のないクラスは、最初に名前を求める際に代入されている定数名を検
索し、見つかった定数名をクラス名とします。
//emlist[例][ruby]{
p foo = Class.new # => #<Class:0x401b90f8>
p foo.name # => nil
Foo = foo # ここで p foo すれば "Foo" 固定
Bar = foo
p foo.name # => "Bar" ("Foo" になるか "Bar" になるかは... -
Class
# _ load(str) -> Class (63604.0) -
Object#_dump を参照して下さい。
Object#_dump を参照して下さい。
@param str Ruby のオブジェクトがダンプされた文字列を指定します。 -
Class
# new(*args , &block) -> object (63373.0) -
自身のインスタンスを生成して返します。 このメソッドの引数はブロック引数も含め Object#initialize に渡されます。
自身のインスタンスを生成して返します。
このメソッドの引数はブロック引数も含め Object#initialize に渡されます。
new は Class#allocate でインスタンスを生成し、
Object#initialize で初期化を行います。
@param args Object#initialize に渡される引数を指定します。
@param block Object#initialize に渡されるブロックを指定します。
//emlist[例][ruby]{
# Class クラスのインスタンス、C クラスを生成
C = Class.new # => C
# ... -
Digest
:: Class (63001.0) -
-
VALUE rb
_ class _ protected _ instance _ methods(int argc , VALUE *argv , VALUE mod) (54901.0) -
Module#protected_instance_methods の実体。 モジュール mod に定義されている protected メソッド名の リストを文字列の配列で返します。
Module#protected_instance_methods の実体。
モジュール mod に定義されている protected メソッド名の
リストを文字列の配列で返します。 -
OpenSSL
:: ASN1 :: ASN1Data # tag _ class=(tag _ class) (46243.0) -
タグクラスを設定します。
タグクラスを設定します。
@param tag_class 設定するタグクラス。:UNIVERSAL、:ONTEXT_SPECIFIC、:APPLICATION、:PRIVATE のいずれか
@see OpenSSL::ASN1::ASN1Data#tag_class -
OpenSSL
:: ASN1 :: ASN1Data # tag _ class -> Symbol (45622.0) -
タグクラスを返します。
タグクラスを返します。
:UNIVERSAL、:CONTEXT_SPECIFIC、:APPLICATION, :PRIVATE のいずれかを返します。
@see OpenSSL::ASN1::ASN1Data#tag_class= -
JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String (45301.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
"false" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
false.to_json # => "false"
//} -
JSON
:: Generator :: GeneratorMethods :: NilClass # to _ json(state _ or _ hash = nil) -> String (45301.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
"null" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
nil.to_json # => "null"
//} -
JSON
:: Generator :: GeneratorMethods :: TrueClass # to _ json(state _ or _ hash = nil) -> String (45301.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
"true" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
true.to_json # => "true"
//} -
JSON
:: Generator :: GeneratorMethods :: TrueClass (45001.0) -
TrueClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
TrueClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。 -
Object
# singleton _ class -> Class (37015.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>
n... -
static VALUE rb
_ class _ allocate _ instance(VALUE klass) (36949.0) -
Class#allocate の実体です。
Class#allocate の実体です。 -
Kernel
# DelegateClass(superclass) -> object (36937.0) -
クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、 そのクラスを返します。
クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、
そのクラスを返します。
@param superclass 委譲先となるクラス
例:
//emlist{
require 'delegate'
class ExtArray < DelegateClass(Array)
def initialize
super([])
end
end
a = ExtArray.new
p a.class # => ExtArray
a.push 25
p a # => [25]
//} -
VALUE rb
_ path2class(const char *path) (36901.0) -
-
static VALUE rb
_ class _ superclass(VALUE klass) (36901.0) -
-
Module
# public _ class _ method(*name) -> self (36679.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
name で指定したクラスメソッド (クラスの特異メソッド) の
可視性を public に変更します。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' call... -
Module
# public _ class _ method(names) -> self (36679.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
name で指定したクラスメソッド (クラスの特異メソッド) の
可視性を public に変更します。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' call... -
Module
# singleton _ class? -> bool (36676.0) -
self が特異クラスの場合に true を返します。そうでなければ false を返し ます。
self が特異クラスの場合に true を返します。そうでなければ false を返し
ます。
//emlist[例][ruby]{
class C
end
C.singleton_class? # => false
C.singleton_class.singleton_class? # => true
//} -
VALUE rb
_ class _ path(VALUE klass) (36667.0) -
klass の名前を返します.klassが無名クラス、無名モジュー ルの場合 #<Class 0xXXXX>, #<Module 0xXXXX> の形式で返します。
klass の名前を返します.klassが無名クラス、無名モジュー
ルの場合 #<Class 0xXXXX>, #<Module 0xXXXX> の形式で返します。
Module#to_s の定義は
rb_str_dup(rb_class_path(klass));
です。 -
Module
# private _ class _ method(*name) -> self (36661.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を private に変更します。
name で指定したクラスメソッド (クラスの特異メソッド) の
可視性を private に変更します。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
module Foo
def self.foo; end
end
Foo.singleton_class.private_method_defined?(:foo) # => false
Foo.private_class_method(:f... -
Module
# private _ class _ method(names) -> self (36661.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を private に変更します。
name で指定したクラスメソッド (クラスの特異メソッド) の
可視性を private に変更します。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
module Foo
def self.foo; end
end
Foo.singleton_class.private_method_defined?(:foo) # => false
Foo.private_class_method(:f... -
Socket
:: Constants :: IPV6 _ RECVTCLASS -> Integer (36649.0) -
Receive traffic class。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
Receive traffic class。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IPV6,
3542 -
Socket
:: Constants :: IPV6 _ TCLASS -> Integer (36649.0) -
Specify the traffic class。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
Specify the traffic class。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IPV6,
3542 -
Socket
:: IPV6 _ RECVTCLASS -> Integer (36649.0) -
Receive traffic class。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
Receive traffic class。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IPV6,
3542 -
Socket
:: IPV6 _ TCLASS -> Integer (36649.0) -
Specify the traffic class。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。
Specify the traffic class。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。
@see Socket::Constants::IPPROTO_IPV6,
3542 -
VALUE rb
_ class _ new _ instance(int argc , VALUE *argv , VALUE klass) (36649.0) -
Class#new の実体です。
Class#new の実体です。 -
static VALUE boot
_ defclass(char *name , VALUE super) (36649.0) -
(まだ) メタクラスを持たないクラスを作成します。 三つのメタオブジェクト Object, Module, Class を 作成するのに使います。
(まだ) メタクラスを持たないクラスを作成します。
三つのメタオブジェクト Object, Module, Class を
作成するのに使います。 -
static VALUE rb
_ class _ initialize(int argc , VALUE *argv , VALUE klass) (36649.0) -
Class#initialize の実体です。
Class#initialize の実体です。 -
Module
# class _ variable _ get(name) -> object (36640.0) -
クラス/モジュールに定義されているクラス変数 name の値を返します。
クラス/モジュールに定義されているクラス変数 name の値を返します。
@param name String または Symbol を指定します。
@raise NameError クラス変数 name が定義されていない場合、発生します。
//emlist[例][ruby]{
class Fred
@@foo = 99
end
def Fred.foo
class_variable_get(:@@foo)
end
p Fred.foo #=> 99
//} -
Module
# class _ variable _ set(name , val) -> object (36640.0) -
クラス/モジュールにクラス変数 name を定義して、その値として val をセットします。val を返します。
クラス/モジュールにクラス変数 name を定義して、その値として
val をセットします。val を返します。
@param name String または Symbol を指定します。
//emlist[例][ruby]{
class Fred
@@foo = 99
def foo
@@foo
end
end
def Fred.foo(val)
class_variable_set(:@@foo, val)
end
p Fred.foo(101) # => 101
p Fred.new.foo # => 101
//} -
Module
# protected _ method _ defined?(name , inherit=true) -> bool (36637.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が protected であるときに true を返します。 そうでなければ false を返します。
インスタンスメソッド name がモジュールに定義されており、
しかもその可視性が protected であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。
@see Module#method_defined?, Module#public_method_defined?, Module#private_method_defined?
//e... -
Net
:: HTTPResponse :: CODE _ CLASS _ TO _ OBJ -> Hash (36622.0) -
HTTP レスポンスステータスコードの最初の数字からレスポンスのクラス(分類)を あらわすクラスへのハッシュです。
HTTP レスポンスステータスコードの最初の数字からレスポンスのクラス(分類)を
あらわすクラスへのハッシュです。
//emlist[][ruby]{
require 'net/http'
Net::HTTPResponse::CODE_CLASS_TO_OBJ['3'] # => Net::HTTPRedirection
//} -
RDoc
:: Context # initialize _ classes _ and _ modules -> () (36601.0) -
追加されたクラスやモジュールをクリアします。
追加されたクラスやモジュールをクリアします。 -
VALUE rb
_ class _ boot(VALUE super) (36601.0) -
スーパークラスを super とするクラスオブジェクトを作成し、返します。
スーパークラスを super とするクラスオブジェクトを作成し、返します。 -
VALUE rb
_ class _ inherited(VALUE super , VALUE klass) (36601.0) -
クラス super の下位クラス klass が作成されたことを 受けて、super に対し inherited メソッドを呼び出します。
クラス super の下位クラス klass が作成されたことを
受けて、super に対し inherited メソッドを呼び出します。 -
VALUE rb
_ class _ instance _ methods(int argc , VALUE *argv , VALUE mod) (36601.0) -
Module#instance_methods の実体。 モジュール mod に定義されている public メソッド名の リストを文字列の配列で返します。
Module#instance_methods の実体。
モジュール mod に定義されている public メソッド名の
リストを文字列の配列で返します。 -
VALUE rb
_ class _ private _ instance _ methods(int argc , VALUE *argv , VALUE mod) (36601.0) -
Module#private_instance_methods の実体。 モジュール mod に定義されている private メソッド名の リストを文字列の配列で返します。
Module#private_instance_methods の実体。
モジュール mod に定義されている private メソッド名の
リストを文字列の配列で返します。 -
VALUE rb
_ make _ metaclass(VALUE obj , VALUE klass) (36601.0) -
クラス klass のインスタンス obj に特異クラスを導入し 特異クラスと obj を結びつけます。
クラス klass のインスタンス obj に特異クラスを導入し
特異クラスと obj を結びつけます。 -
VALUE rb
_ singleton _ class(VALUE obj) (36601.0) -
obj に特異クラスを導入し、その特異クラスを返します。 すでに特異クラスが導入されているときはそれをそのまま返します。
obj に特異クラスを導入し、その特異クラスを返します。
すでに特異クラスが導入されているときはそれをそのまま返します。
obj が特異メソッドを定義できない型のオブジェクトである
ときは例外 TypeError を発生します。 -
VALUE rb
_ singleton _ class _ clone(VALUE klass) (36601.0) -
特異クラス klass を clone して返します。 klass が特異クラスでないときはただ klass を返します。
特異クラス klass を clone して返します。
klass が特異クラスでないときはただ klass を返します。 -
VALUE rb
_ singleton _ class _ new(VALUE super) (36601.0) -
super をスーパークラスとする特異クラスを生成し、返します。
super をスーパークラスとする特異クラスを生成し、返します。 -
Win32
:: Registry :: Constants :: HKEY _ CLASSES _ ROOT (36601.0) -
@todo
@todo
定義済キー値。
これらは Integer で、Win32::Registry オブジェクトではありません。 -
Win32
:: Registry :: HKEY _ CLASSES _ ROOT -> Win32 :: Registry (36601.0) -
@todo
@todo
それぞれの定義済キーを表す Win32::Registry オブジェクトです。
詳細は以下の MSDN Library を参照してください。
* Predefined Keys: http://msdn.microsoft.com/library/en-us/sysinfo/base/predefined_keys.asp -
static VALUE find
_ class _ path(VALUE klass) (36601.0) -
クラス klass のクラスパスを探索し、Ruby の文字列で返します。
クラス klass のクラスパスを探索し、Ruby の文字列で返します。 -
void rb
_ set _ class _ path(VALUE klass , VALUE under , const char *name) (36601.0) -
-
void rb
_ singleton _ class _ attached(VALUE klass , VALUE obj) (36601.0) -
特異クラス klass にその唯一のインスタンス obj を結びつけます。
特異クラス klass にその唯一のインスタンス obj を結びつけます。 -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (36319.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw _ object -> Hash (36319.0) -
生の文字列を格納したハッシュを生成します。
生の文字列を格納したハッシュを生成します。
このメソッドは UTF-8 の文字列ではなく生の文字列を JSON に変換する場合に使用してください。
require 'json'
"にほんご".encode("euc-jp").to_json_raw_object
# => {"json_class"=>"String", "raw"=>[164, 203, 164, 219, 164, 243, 164, 180]}
"にほんご".encode("euc-jp").to_json # source sequence is illegal/malformed (JSON::... -
JSON
:: Ext :: Generator :: GeneratorMethods :: TrueClass (36001.0) -
Alias of JSON::Generator::GeneratorMethods::TrueClass
Alias of JSON::Generator::GeneratorMethods::TrueClass -
JSON
:: Generator :: GeneratorMethods :: FalseClass (36001.0) -
FalseClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
FalseClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。 -
JSON
:: Generator :: GeneratorMethods :: NilClass (36001.0) -
NilClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
NilClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。 -
TrueClass (36001.0)
-
true のクラス。 true は TrueClass クラスの唯一のインスタンスです。 true は真を表す代表のオブジェクトです。
true のクラス。
true は TrueClass クラスの唯一のインスタンスです。
true は真を表す代表のオブジェクトです。 -
RDoc
:: Context # add _ class(class _ type , name , superclass) -> RDoc :: SingleClass | RDoc :: NormalClass (28825.0) -
引数で指定したクラスを追加します。
引数で指定したクラスを追加します。
@param class_type 追加するクラス、モジュールを RDoc::NormalClass、
RDoc::SingleClass、RDoc::NormalModule オ
ブジェクトのいずれかで指定します。
@param name クラス名を文字列で指定します。
@param superclass 追加するクラスの親クラスを RDoc::NormalClass オ
ブジェクトで指定します。 -
RDoc
:: Context # add _ class _ or _ module(collection , class _ type , name , superclass = nil) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule (28825.0) -
collection に name で指定したクラス、モジュールを追加します。
collection に name で指定したクラス、モジュールを追加します。
@param collection クラス、モジュールを追加する先を Hash オブジェ
クトで指定します。
@param class_type 追加するクラス、モジュールを RDoc::NormalClass、
RDoc::SingleClass、RDoc::NormalModule オ
ブジェクトのいずれかで指定します。
@param name クラス名を文字列で指定します。
@param su... -
RDoc
:: TopLevel # add _ class _ or _ module(collection , class _ type , name , superclass) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule (28825.0) -
collection に name で指定したクラス、モジュールを追加します。
collection に name で指定したクラス、モジュールを追加します。
@param collection クラス、モジュールを追加する先を Hash オブジェ
クトで指定します。
@param class_type 追加するクラス、モジュールを RDoc::NormalClass、
RDoc::SingleClass、RDoc::NormalModule オ
ブジェクトのいずれかで指定します。
@param name クラス名を文字列で指定します。
@param su... -
Rake
:: TaskManager # define _ task(task _ class , *args) { . . . } -> Rake :: Task (28258.0) -
タスクを定義します。
タスクを定義します。
@param task_class タスククラスを指定します。
@param args タスクに渡すパラメータを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.define_task(Rake::Task, :t) # => <Rake::Task t => []>
end
//} -
Exception2MessageMapper
# def _ exception(exception _ name , message _ format , superclass = StandardError) -> Class (28204.0) -
exception_name という名前の例外クラスを定義します。
exception_name という名前の例外クラスを定義します。
@param exception_name 定義する例外クラスの名前をシンボルで指定します。
@param message_format メッセージのフォーマット。
@param superclass 定義する例外のスーパークラスを指定します。
省略すると StandardError を使用します。 -
Timeout
. # timeout(sec , exception _ class = nil) {|i| . . . } -> object (28102.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
ブロックを sec 秒の期限付きで実行します。
ブロックの実行時間が制限を過ぎたときは例外
Timeout::Error が発生します。
exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはいります。
また sec が 0 もしくは nil のときは制限時間なしで
ブロックを実行します。
@param sec タイムアウトする時間を秒数で指定します.
@param exception_class タイムアウトした時、発生させる例外を指定します.
例 長い計算のタイムアウト
r... -
Exception2MessageMapper
. def _ exception(klass , exception _ name , message _ format , superklass = StandardError) -> Class (27904.0) -
exception_name という名前の例外クラスを定義します。
exception_name という名前の例外クラスを定義します。
@param klass 一階層上となるクラス名を指定します。
@param exception_name 例外クラスの名前をシンボルで指定します。
@param message_format メッセージのフォーマットを指定します。
Kernel.#sprintf のフォーマット文字列と同じ形式を使用できます。
@param superklass 定義する例外クラスのスーパークラスを指定します。
省略すると StandardError を使用... -
RDoc
:: TopLevel . find _ class _ named(name) -> RDoc :: NormalClass | RDoc :: SingleClass | nil (27904.0) -
RDoc が収集したクラスの内、name で指定した名前のクラスを返します。見つ からなかった場合は nil を返します。
RDoc が収集したクラスの内、name で指定した名前のクラスを返します。見つ
からなかった場合は nil を返します。
@param name クラス名を文字列で指定します。 -
ARGF
. class # set _ encoding(ext _ enc , int _ enc , options = {}) -> self (27901.0) -
ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。
ARGF の外部/内部エンコーディングを設定します。
次以降に処理するファイルにも同じ設定が適用されます。
外部エンコーディングは ARGF を介して読み込むファイルの、
内部エンコーディングは読み込んだ文字列のエンコーディングです。
詳しくは IO#set_encoding を参照してください。
@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで
区切って指定します。
@param ext_enc 外部エンコーディングを表す文字列か
Encoding オブジェクトを指定します。
@para... -
RDoc
:: Context # classes -> [RDoc :: SingleClass | RDoc :: NormalClass] (27901.0) -
追加されたクラスの配列を返します。
追加されたクラスの配列を返します。 -
RDoc
:: Context # each _ classmodule {|m| . . . } -> [RDoc :: SingleClass | RDoc :: NormalClass | RDoc :: NormalModule] (27901.0) -
追加されたクラス、モジュールに対してブロックを評価します。
追加されたクラス、モジュールに対してブロックを評価します。
@see RDoc::Context#classes, RDoc::Context#modules -
RDoc
:: TopLevel . all _ classes _ and _ modules -> [RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule] (27901.0) -
RDoc が収集したクラス、モジュールを配列で返します。
RDoc が収集したクラス、モジュールを配列で返します。 -
Object
# class -> Class (27769.0) -
レシーバのクラスを返します。
レシーバのクラスを返します。
//emlist[][ruby]{
p "ruby".class #=> String
p 100.class #=> Integer
p ARGV.class #=> Array
p self.class #=> Object
p Class.class #=> Class
p Kernel.class #=> Module
//}
@see Class#superclass,Object#kind_of?,Object#instance_of? -
TracePoint
# defined _ class -> Class | module (27751.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;
trac... -
JSON
:: State . from _ state(options) -> JSON :: State (27709.0) -
与えられた options によって生成した JSON::State のインスタンスを返します。
与えられた options によって生成した JSON::State のインスタンスを返します。
@param options JSON::State のインスタンスか、ハッシュを指定します。
@return options がハッシュである場合は、それによって初期化した JSON::State を
返します。options が JSON::State のインスタンスである場合は単に
options を返します。いずれでも無い場合は、何も設定されていない JSON::State の
インスタンスを返します。
//emlist[例 Hash... -
ObjectSpace
. # count _ objects _ size(result _ hash = nil) -> Hash (27691.0) -
型ごとのオブジェクトサイズをバイト単位で格納したハッシュを返します。
型ごとのオブジェクトサイズをバイト単位で格納したハッシュを返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効果を避けるために使用します。
戻り値の内容は完全ではない事に注意してください。この内容はあくまでもヒ
ントとして扱う必要があります。特に T_DATA の合計値は正しくないでしょう。
//emlist[例][ruby]{
ObjectSpace.count_objec... -
ObjectSpace
. # count _ tdata _ objects(result _ hash = nil) -> Hash (27667.0) -
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効果を避けるために使用します。
@raise TypeError result_hash にハッシュ以外を指定した時に発生します。
本メソッドは普通の Ruby プログラマ向けのメソッドではありません。パフォー
マンスに興味のある C Ruby の開発者向けのもので... -
IRB
:: ExtendCommandBundle . def _ extend _ command(cmd _ name , cmd _ class , load _ file = nil , *aliases) -> object (27658.0) -
irb に cmd_name で指定したメソッドが実行できるように拡張します。
irb に cmd_name で指定したメソッドが実行できるように拡張します。
@param cmd_name メソッド名を Symbol か文字列で指定します。
cmd_class で指定するクラスの execute メソッドとして定
義してある必要があります。
@param cmd_class 指定した拡張が定義されたクラス名を Symbol、
String、Class のいずれかで指定します。
なお、このクラスは IRB::ExtendCommand ... -
ObjectSpace
. # count _ objects(result _ hash = {}) -> Hash (27655.0) -
オブジェクトを種類ごとにカウントした結果を Hash として返します。
オブジェクトを種類ごとにカウントした結果を Hash として返します。
このメソッドは C Ruby 以外の Ruby では動かないでしょう。
@param result_hash ハッシュを指定します。与えられたハッシュは上書きして返されます。
これを利用すると測定による影響を避けることができます。
@raise TypeError 引数に Hash 以外を与えた場合、発生します。
//emlist[例][ruby]{
ObjectSpace.count_objects # => {:TOTAL=>10000, :FREE=>3011, :T_... -
ARGF
. class # bytes { |byte| . . . } -> self (27649.0) -
このメソッドは obsolete です。 代わりに ARGF.class#each_byte を使用してください。 使用すると警告メッセージが表示されます。
このメソッドは obsolete です。
代わりに ARGF.class#each_byte を使用してください。
使用すると警告メッセージが表示されます。 -
ARGF
. class # each _ byte { |byte| . . . } -> self (27619.0) -
ARGF の現在位置から 1 バイトずつ読み込み、それを整数として与え、ブロックを実行します。 ブロック引数byteは0..255のいずれかの整数です。
ARGF の現在位置から 1 バイトずつ読み込み、それを整数として与え、ブロックを実行します。
ブロック引数byteは0..255のいずれかの整数です。
このメソッドはスクリプトに指定した引数(Object::ARGV を参照) をファ
イル名とみなして、それらのファイルを連結した 1 つの仮想ファイルを表すオ
ブジェクトです。そのため、最初のファイルを最後まで読んだ後は次のファイ
ルの内容を返します。現在位置の1バイトについてファイル名を得るには
ARGF.class#filename を使用します。
ブロックが与えられなかった場合は、Enumerator オブジェクトを生成して返しま... -
ARGF
. class # write(str) -> Integer (27619.0) -
処理対象のファイルに対して str を出力します。 str が文字列でなければ to_s による文字列化を試みます。 実際に出力できたバイト数を返します。
処理対象のファイルに対して str を出力します。
str が文字列でなければ to_s による文字列化を試みます。
実際に出力できたバイト数を返します。
c:ARGF#inplace時にのみ使用できます。
@param str 出力する文字列を指定します。
@see ARGF.class#to_write_io -
ERB
:: DefMethod . # def _ erb _ method(methodname , erb) -> nil (27619.0) -
self に erb のスクリプトをメソッドとして定義します。
self に erb のスクリプトをメソッドとして定義します。
メソッド名は methodname で指定します。
erb が文字列の時、そのファイルを読み込み ERB で変換したのち、メソッドとして定義します。
@param methodname メソッド名
@param erb ERBインスタンスもしくはERBソースファイル名
例:
require 'erb'
class Writer
extend ERB::DefMethod
def_erb_method('to_html', 'writer.erb')
...
end
...
p... -
Tracer
. set _ get _ line _ procs(filename) {|line| . . . . } (27619.0) -
あるファイルについて利用する、行番号からソースのその行の内容を返す 手続きを指定します。何も指定しなければデフォルトの動作が利用されます。 指定する手続きは行番号を唯一の引数として呼び出されます。
あるファイルについて利用する、行番号からソースのその行の内容を返す
手続きを指定します。何も指定しなければデフォルトの動作が利用されます。
指定する手続きは行番号を唯一の引数として呼び出されます。
@param filename ソースファイルの場所を文字列で指定します。
@param proc 通常、文字列を返す手続きオブジェクトを指定します。
# 例 dummy.rb の3行目から6 行目のトレース出力に !! をつける
require 'tracer'
Tracer.set_get_line_procs('./dummy.rb'){|line|
str = "... -
Tracer
. set _ get _ line _ procs(filename , proc) (27619.0) -
あるファイルについて利用する、行番号からソースのその行の内容を返す 手続きを指定します。何も指定しなければデフォルトの動作が利用されます。 指定する手続きは行番号を唯一の引数として呼び出されます。
あるファイルについて利用する、行番号からソースのその行の内容を返す
手続きを指定します。何も指定しなければデフォルトの動作が利用されます。
指定する手続きは行番号を唯一の引数として呼び出されます。
@param filename ソースファイルの場所を文字列で指定します。
@param proc 通常、文字列を返す手続きオブジェクトを指定します。
# 例 dummy.rb の3行目から6 行目のトレース出力に !! をつける
require 'tracer'
Tracer.set_get_line_procs('./dummy.rb'){|line|
str = "... -
WEBrick
:: HTTPResponse # http _ version -> WEBrick :: HTTPVersion (27619.0) -
レスポンスの HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトを返します。
レスポンスの HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトを返します。
require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )
p res.http_version.class #=> WEBrick::HTTPVersion
p res.http_version.to_s #=... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (27619.0) -
型が持つソースインターフェイスを取得します。
型が持つソースインターフェイスを取得します。
default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。
@return デフォルトのソースインターフェイスをWIN32OLE_TYPEの配列と
して返します。返すのは配列ですが、デフォルトのソースインターフェ
イスは最大でも1インターフェイスです。ソースインターフェイスを持
たない場合は空配列を返します。
tobj = ... -
Etc
:: Passwd # uclass=(class) (27604.0) -
ユーザアクセスクラス(文字列)を設定します。このメンバはシステム依存です。
ユーザアクセスクラス(文字列)を設定します。このメンバはシステム依存です。 -
Gem
:: Ext :: Builder . class _ name -> String (27604.0) -
@todo
@todo
ビルダーのクラス名を返します。 -
MiniTest
:: Unit :: TestCase :: PASSTHROUGH _ EXCEPTIONS -> [Class] (27604.0) -
システム関連の例外のリストです。内部で使用します。
システム関連の例外のリストです。内部で使用します。 -
ARGF
. class # readbyte -> Integer (27601.0) -
自身から 1 バイトを読み込み整数として返します。 既に EOF に達していれば EOFError が発生します。
自身から 1 バイトを読み込み整数として返します。
既に EOF に達していれば EOFError が発生します。
@raise EOFError 既に EOF に達している場合に発生します。
$ echo "foo" > file
$ ruby argf.rb file
ARGF.readbyte # => 102
ARGF.readbyte # => 111
ARGF.readbyte # => 111
ARGF.readbyte # => 10
ARGF.readbyte # => end of file reached (EOFError)... -
ARGF
. class # set _ encoding(ext _ enc) -> self (27601.0) -
ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。
ARGF の外部/内部エンコーディングを設定します。
次以降に処理するファイルにも同じ設定が適用されます。
外部エンコーディングは ARGF を介して読み込むファイルの、
内部エンコーディングは読み込んだ文字列のエンコーディングです。
詳しくは IO#set_encoding を参照してください。
@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで
区切って指定します。
@param ext_enc 外部エンコーディングを表す文字列か
Encoding オブジェクトを指定します。
@para... -
Etc
:: Passwd # uclass -> String (27601.0) -
ユーザアクセスクラス(文字列)を返します。このメンバはシステム依存です。
ユーザアクセスクラス(文字列)を返します。このメンバはシステム依存です。 -
NilClass
# rationalize -> Rational (27601.0) -
0/1 を返します。
0/1 を返します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[例][ruby]{
nil.rationalize # => (0/1)
nil.rationalize(100) # => (0/1)
nil.rationalize(0.1) # => (0/1)
//} -
NilClass
# rationalize(eps) -> Rational (27601.0) -
0/1 を返します。
0/1 を返します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[例][ruby]{
nil.rationalize # => (0/1)
nil.rationalize(100) # => (0/1)
nil.rationalize(0.1) # => (0/1)
//} -
RDoc
:: Stats # num _ classes -> Integer (27601.0) -
解析したクラスの数を返します。
解析したクラスの数を返します。 -
WIN32OLE
_ TYPE . ole _ classes(libname) -> [WIN32OLE _ TYPE] (27601.0) -
TypeLibで定義されているすべての型情報を取得します。
TypeLibで定義されているすべての型情報を取得します。
@param libname 生成するTypeLibのレジストリ上のドキュメント文字列
(WIN32OLE_TYPELIB#name)または
GUID(WIN32OLE_TYPELIB#guid)またはTLBファイル名を
文字列で指定します。
@return TypeLibに格納されているすべての型をWIN32OLE_TYPEオブジェクトの配列として返します。
@raise WIN32OLERuntimeError 引数で指定したTypeLibが... -
WIN32OLE
_ TYPELIB # ole _ classes -> [WIN32OLE _ TYPE] (27601.0) -
TypeLibに格納されているすべての型を取得します。
TypeLibに格納されているすべての型を取得します。
TypeLibに格納されている型には、クラス(CoClass——コンポーネントクラス)
やEnum(列挙子)、構造体などがあります。
@return TypeLibに格納されているすべての型をWIN32OLE_TYPEオブジェ
クトの配列として返します。
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
classes = tlib.ole_types.map{|k| k.name} # => ["Adjustments... -
WIN32OLE
_ TYPELIB # ole _ types -> [WIN32OLE _ TYPE] (27601.0) -
TypeLibに格納されているすべての型を取得します。
TypeLibに格納されているすべての型を取得します。
TypeLibに格納されている型には、クラス(CoClass——コンポーネントクラス)
やEnum(列挙子)、構造体などがあります。
@return TypeLibに格納されているすべての型をWIN32OLE_TYPEオブジェ
クトの配列として返します。
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
classes = tlib.ole_types.map{|k| k.name} # => ["Adjustments... -
ARGF
. class # readpartial(maxlen , outbuf = nil) -> String (27367.0) -
IO#readpartialを参照。ARGF.class#read などとは違って複数ファ イルを同時に読み込むことはありません。
IO#readpartialを参照。ARGF.class#read などとは違って複数ファ
イルを同時に読み込むことはありません。
@param maxlen 読み込む長さの上限を整数で指定します。
@param outbuf 読み込んだデータを格納する String オブジェクトを指定します。
@see IO#readpartial, ARGF.class#read_nonblock