4076件ヒット
[4001-4076件を表示]
(0.079秒)
種類
ライブラリ
- ビルトイン (1618)
-
cgi
/ core (24) -
cgi
/ html (72) - delegate (24)
- erb (12)
- fileutils (12)
-
irb
/ cmd / help (12) -
irb
/ context (24) -
irb
/ input-method (276) -
irb
/ output-method (96) - logger (1)
-
minitest
/ spec (1) -
minitest
/ unit (2) -
net
/ http (36) -
net
/ imap (24) - objspace (12)
- openssl (252)
- ostruct (12)
- pp (12)
- profiler (6)
- psych (8)
-
rdoc
/ top _ level (12) -
shell
/ command-processor (12) -
shell
/ error (6) - singleton (12)
-
webrick
/ httprequest (12) -
webrick
/ httpresponse (24) -
webrick
/ httpservlet / abstract (12) -
webrick
/ httpstatus (492) - win32ole (372)
クラス
- BasicObject (36)
- CGI (24)
- Delegator (24)
- ERB (12)
- Enumerator (62)
-
Enumerator
:: Lazy (48) - Exception (12)
-
IRB
:: Context (24) -
IRB
:: ExtendCommand :: Help (12) -
IRB
:: FileInputMethod (36) -
IRB
:: InputMethod (48) -
IRB
:: OutputMethod (60) -
IRB
:: ReadlineInputMethod (72) -
IRB
:: StdioInputMethod (72) -
IRB
:: StdioOutputMethod (12) - Method (143)
-
MiniTest
:: Unit (1) - Module (380)
- NameError (24)
-
Net
:: HTTPGenericRequest (12) -
Net
:: IMAP (24) - NoMethodError (40)
- Object (181)
-
OpenSSL
:: Engine (108) -
OpenSSL
:: SSL :: SSLContext (132) -
OpenSSL
:: X509 :: Store (12) - PP (12)
- Proc (56)
-
RDoc
:: TopLevel (12) - Refinement (4)
- Regexp (48)
-
RubyVM
:: InstructionSequence (72) -
Shell
:: CommandProcessor (12) - String (60)
- Thread (12)
- TracePoint (43)
- UnboundMethod (107)
-
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (24) -
WEBrick
:: HTTPServlet :: AbstractServlet (12) - WIN32OLE (72)
-
WIN32OLE
_ METHOD (132) -
WIN32OLE
_ PARAM (120) -
WIN32OLE
_ TYPE (24)
モジュール
-
CGI
:: HtmlExtension (72) - FileUtils (12)
- Kernel (205)
- Marshal (24)
-
MiniTest
:: Assertions (1) -
Net
:: HTTPHeader (12) - ObjectSpace (12)
-
RubyVM
:: AbstractSyntaxTree (10) -
WEBrick
:: HTTPStatus (480)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (14)
- == (24)
- >> (14)
- Application (1)
- CantApplyMethod (6)
- FileInputMethod (12)
- HTTPMethodNotAllowed (12)
- InputMethod (12)
- METHODS (12)
-
METHOD
_ ALL (12) -
METHOD
_ CIPHERS (12) -
METHOD
_ DH (12) -
METHOD
_ DIGESTS (12) -
METHOD
_ DSA (12) -
METHOD
_ NONE (12) -
METHOD
_ RAND (12) -
METHOD
_ RSA (12) - Method (12)
- MethodNotAllowed (12)
-
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NoDelegateMethods (6)
- Numeric (12)
- OpenStruct (12)
- OutputMethod (12)
- Proc (12)
-
Profiler
_ _ (6) -
RC
_ ACCEPTED (12) -
RC
_ BAD _ GATEWAY (12) -
RC
_ BAD _ REQUEST (12) -
RC
_ CONFLICT (12) -
RC
_ CONTINUE (12) -
RC
_ CREATED (12) -
RC
_ EXPECTATION _ FAILED (12) -
RC
_ FORBIDDEN (12) -
RC
_ FOUND (12) -
RC
_ GATEWAY _ TIMEOUT (12) -
RC
_ GONE (12) -
RC
_ HTTP _ VERSION _ NOT _ SUPPORTED (12) -
RC
_ INTERNAL _ SERVER _ ERROR (12) -
RC
_ LENGTH _ REQUIRED (12) -
RC
_ METHOD _ NOT _ ALLOWED (12) -
RC
_ MOVED _ PERMANENTLY (12) -
RC
_ MULTIPLE _ CHOICES (12) -
RC
_ NON _ AUTHORITATIVE _ INFORMATION (12) -
RC
_ NOT _ ACCEPTABLE (12) -
RC
_ NOT _ FOUND (12) -
RC
_ NOT _ IMPLEMENTED (12) -
RC
_ NOT _ MODIFIED (12) -
RC
_ NO _ CONTENT (12) -
RC
_ OK (12) -
RC
_ PARTIAL _ CONTENT (12) -
RC
_ PAYMENT _ REQUIRED (12) -
RC
_ PRECONDITION _ FAILED (12) -
RC
_ PROXY _ AUTHENTICATION _ REQUIRED (12) -
RC
_ REQUEST _ ENTITY _ TOO _ LARGE (12) -
RC
_ REQUEST _ RANGE _ NOT _ SATISFIABLE (12) -
RC
_ REQUEST _ TIMEOUT (12) -
RC
_ REQUEST _ URI _ TOO _ LARGE (12) -
RC
_ RESET _ CONTENT (12) -
RC
_ SEE _ OTHER (12) -
RC
_ SERVICE _ UNAVAILABLE (12) -
RC
_ SWITCHING _ PROTOCOLS (12) -
RC
_ TEMPORARY _ REDIRECT (12) -
RC
_ UNAUTHORIZED (12) -
RC
_ UNSUPPORTED _ MEDIA _ TYPE (12) -
RC
_ USE _ PROXY (12) - ReadlineInputMethod (12)
- Ruby プログラムの実行 (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Singleton (12)
- StdioInputMethod (12)
- StdioOutputMethod (12)
- UnboundMethod (12)
-
WIN32OLE
_ METHOD (12) -
WIN32OLE
_ PARAM (12) - [] (12)
-
_ _ callee _ _ (12) -
_ _ method _ _ (12) -
_ getproperty (12) -
_ invoke (12) -
_ setproperty (12) -
absolute
_ path (12) -
add
_ response _ handler (24) - args (12)
- arity (24)
-
assert
_ respond _ to (1) - backtrace (12)
- bind (12)
-
callee
_ id (12) - caller (36)
-
cgi
/ session (12) -
class
_ exec (12) -
client
_ cert _ cb= (12) -
collect
_ method (12) -
convert
_ type (12) -
count
_ nodes (12) - coverage (8)
- curry (22)
- debug (12)
-
def
_ class (12) - default (12)
-
default
_ event _ sources (12) -
define
_ method (24) - disasm (12)
- disassemble (12)
- dispid (12)
- dump (24)
- each (48)
- encode (36)
- encoding (36)
-
enum
_ for (48) - eof? (24)
- eql? (24)
- eval (24)
- execute (12)
- fail (36)
-
file
_ name (12) -
find
_ local _ symbol (12) -
first
_ lineno (12) - form (24)
- gets (48)
- hash (24)
- header (12)
- helpcontext (12)
- helpfile (12)
- helpstring (12)
-
import
_ methods (4) - input? (12)
-
ins
_ methods _ priv _ i (12) -
ins
_ methods _ prot _ i (12) - inspect (24)
-
instance
_ eval (24) -
instance
_ methods (12) - io (12)
- irb (12)
-
irb
/ completion (12) -
irb
/ input-method (12) -
irb
/ output-method (12) - lambda (18)
- lambda? (12)
-
last
_ match (24) - line (24)
- main (12)
- match (24)
-
method
_ added (6) -
method
_ id (12) -
method
_ inspect (12) -
method
_ list (12) -
method
_ missing (12) -
method
_ proc (12) - methods (12)
-
module
_ exec (12) -
module
_ function (36) -
multipart
_ form (48) -
must
_ respond _ to (1) - name (24)
- new (153)
- of (22)
-
ole
_ method _ help (12) -
ole
_ methods (12) -
ole
_ put _ methods (12) -
ole
_ show _ help (12) -
ole
_ type (12) -
ole
_ type _ detail (12) - optional? (12)
- out (12)
- output? (12)
- parameters (43)
- params (12)
- path (12)
- pp (12)
- ppx (12)
- print (24)
- printn (12)
- private (48)
-
private
_ call? (9) -
private
_ class _ method (24) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
private
_ methods (12) - proc (19)
- protected (48)
-
protected
_ instance _ methods (12) -
protected
_ method _ defined? (12) -
protected
_ methods (24) -
psych
_ yaml _ as (4) - public (48)
-
public
_ class _ method (24) -
public
_ instance _ method (12) -
public
_ instance _ methods (12) -
public
_ method (12) -
public
_ method _ defined? (12) -
public
_ methods (24) - puke (1)
- puts (12)
- raise (36)
-
rb
_ call (12) -
rb
_ catch (12) -
rb
_ check _ convert _ type (12) -
rb
_ class _ private _ instance _ methods (12) -
rb
_ class _ protected _ instance _ methods (12) -
rb
_ convert _ type (12) -
rb
_ define _ private _ method (12) -
rb
_ define _ protected _ method (12) -
rb
_ export _ method (12) -
rb
_ get _ method _ body (12) -
rb
_ method _ boundp (12) -
rb
_ mod _ private _ method (12) -
rb
_ mod _ public _ method (12) -
rb
_ obj _ private _ methods (12) -
rb
_ obj _ protected _ methods (12) - rdoc (12)
-
rdoc
/ parser / c (12) -
rdoc
/ parser / ruby (12) -
readable
_ atfer _ eof? (36) -
renegotiation
_ cb= (12) -
request
_ method (24) -
request
_ method= (12) -
require
_ relative (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) -
return
_ type (12) -
return
_ type _ detail (12) -
return
_ vtype (12) - retval? (12)
-
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / streamparser (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
ruby2
_ keywords (6) - send (24)
- seplist (12)
-
servername
_ cb= (12) - service (12)
-
session
_ get _ cb= (12) -
session
_ new _ cb= (12) -
session
_ remove _ cb= (12) -
set
_ default (12) -
singleton
_ methods (12) -
size
_ opt _ params (12) -
size
_ params (12) -
source
_ location (12) -
super
_ method (22) -
tmp
_ dh _ callback= (12) -
to
_ enum (48) -
to
_ proc (12) -
to
_ s (60) -
to
_ str (12) -
umethod
_ proc (12) -
verify
_ callback= (24) - xmlrpc (3)
-
yaml
_ as (4) - クラス/メソッドの定義 (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
- リテラル (12)
- 制御構造 (12)
- 手続きオブジェクトの挙動の詳細 (12)
検索結果
先頭5件
-
Module
# module _ function(name) -> String | Symbol (18.0) -
メソッドをモジュール関数にします。
...まま返します。
複数の引数が与えられた時には配列にまとめて返します。
引数なしの時は nil を返します。
@param name String または Symbol を 0 個以上指定します。
=== 注意
module_function はメソッドに「モジュール関数」という......の別名は定義できません。
//emlist[例][ruby]{
module M
def foo
p "foo"
end
module_function :foo
alias bar foo
end
M.foo # => "foo"
M.bar # => undefined method `bar' for Foo:Module (NoMethodError)
//}
このコードでは、モジュール関数 foo と
プライベー......付けるには、
以下のように、先に別名を定義してから
それぞれをモジュール関数にしなければいけません。
//emlist[例][ruby]{
module M
def foo
p "foo"
end
alias bar foo
module_function :foo, :bar
end
M.foo # => "foo"
M.bar # => "foo"
//}... -
NameError
# name -> Symbol (18.0) -
この例外オブジェクトを発生させる原因となった 変数や定数、メソッドの名前をシンボルで返します。
...クトを発生させる原因となった
変数や定数、メソッドの名前をシンボルで返します。
例:
begin
foobar
rescue NameError => err
p err # => #<NameError: undefined local variable or method `foobar' for main:Object>
p err.name # => :foobar
end... -
Numeric (18.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...かはそれぞ
れのクラスを参照してください。
=> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Numeric Integer Fixnum Bignum Float Rational Complex
---------------------------------------------------------------......o o o - -
Numeric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
<< | - -......ingleton_method_added | o - - - - - -
size | - - o o - - -
Numeric Integer Fixnum Bignum Float Rational Complex......いるかはそれぞ
れのクラスを参照してください。
=> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------......< | - o o - -
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
<< | - o -......| o o o o -
singleton_method_added | o - - - -
size | - o - - -
step | o - - - -... -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (18.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
...の 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2... -
Enumerator
. new(size=nil) {|y| . . . } -> Enumerator (17.0) -
Enumerator オブジェクトを生成して返します。与えられたブロックは Enumerator::Yielder オブジェクトを 引数として実行されます。
...。
このときのブロックの返り値が each の返り値となります。
@param size 生成する Enumerator オブジェクトの要素数を指定します。
Integer、Float::INFINITY、Proc オブジェク
ト、nil のいずれかを指定します。Enumerato......照されます。
//emlist[例][ruby]{
enum = Enumerator.new{|y|
(1..10).each{|i|
y << i if i % 5 == 0
}
}
enum.each{|i| p i }
#=> 5
# 10
fib = Enumerator.new { |y|
a = b = 1
loop {
y << a
a, b = b, a + b
}
}
p fib.take(10) #=> [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
//}... -
Singleton (12.0)
-
Singleton パターンを提供するモジュールです。
...れます。
Singleton を Mix-in したクラスの
クラスメソッド instance はその唯一のインスタンスを返します。
new は private メソッドに移され、外部から呼び出そうとするとエラーになります。
=== サンプルコード
require 'singleton'......a = SomeSingletonClass.instance
b = SomeSingletonClass.instance # a and b are same object
p [a,b] # => [#<SomeSingletonClass:0x0000562e6e18ddd0>, #<SomeSingletonClass:0x0000562e6e18ddd0>]
a = SomeSingletonClass.new # => NoMethodError (private method `new' called for SomeSingletonClass:Class)... -
Thread
# [](name) -> object | nil (12.0) -
name に対応したスレッドに固有のデータを取り出します。 name に対応するスレッド固有データがなければ nil を返し ます。
...@param name スレッド固有データのキーを文字列か Symbol で指定します。
//emlist[例][ruby]{
[
Thread.new { Thread.current["name"] = "A" },
Thread.new { Thread.current[:name] = "B" },
Thread.new { Thread.current["name"] = "C" }
].each do |th|
th.join
puts "#{th.inspe......][ruby]{
f = Fiber.new {
meth(1) {
Fiber.yield
}
}
meth(2) {
f.resume
}
f.resume
p Thread.current[:name]
# => nil if fiber-local
# => 2 if thread-local (The value 2 is leaked to outside of meth method.)
//}
Fiber を切り替えても同じ変数を返したい場合は
Thread#thread_vari...