1107件ヒット
[1-100件を表示]
(0.138秒)
ライブラリ
- ビルトイン (300)
- matrix (11)
- mkmf (33)
-
mutex
_ m (11) - rake (66)
-
rake
/ gempackagetask (11) -
rake
/ packagetask (11) -
rake
/ rdoctask (11) -
rake
/ testtask (11) -
rdoc
/ context (11) - rexml (11)
-
rexml
/ document (22) -
shell
/ error (6) -
win32
/ registry (44) - win32ole (22)
クラス
- BasicObject (11)
- Binding (11)
- Data (14)
-
Encoding
:: UndefinedConversionError (55) - Module (99)
- Object (33)
-
RDoc
:: Context (11) -
REXML
:: Element (22) -
Rake
:: FileList (22) -
Rake
:: GemPackageTask (11) -
Rake
:: PackageTask (11) -
Rake
:: RDocTask (11) -
Rake
:: Task (22) -
Rake
:: TestTask (11) - TracePoint (11)
-
WIN32OLE
_ TYPE (11) -
Win32
:: Registry :: PredefinedKey (33)
モジュール
- Kernel (44)
-
Mutex
_ m (11) - ObjectSpace (33)
-
Rake
:: TaskManager (11) -
WIN32OLE
:: VARIANT (11)
オブジェクト
- main (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - CantDefine (6)
- ErrOperationNotDefined (11)
-
MUST
_ DEFINE (11) -
MUST
_ NOT _ DEFINE (11) -
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) - PredefinedKey (11)
- Ruby用語集 (11)
- UNDEFINED (11)
- UndefinedConversionError (11)
- UndefinedNamespaceException (11)
-
VT
_ USERDEFINED (11) -
arg
_ defined (11) - bigdecimal (11)
- class (11)
-
class
_ variable _ defined? (11) - close (11)
-
const
_ defined? (11) -
convertible
_ int (22) -
create
_ header (11) -
deconstruct
_ keys (2) -
default
_ event _ sources (11) -
define
_ aliases (11) -
define
_ final (11) -
define
_ finalizer (22) -
define
_ method (44) -
define
_ singleton _ method (22) -
define
_ task (22) -
defined
_ class (11) -
defined
_ in? (11) -
destination
_ encoding (11) -
destination
_ encoding _ name (11) -
error
_ char (11) -
ev
_ const _ defined (11) - file (11)
-
generic
_ ivar _ defined (11) - hash (2)
- inspect (2)
-
instance
_ variable _ defined? (11) -
is
_ defined (11) -
local
_ variable _ defined? (11) -
method
_ defined? (11) -
method
_ undefined (11) - new (22)
-
private
_ method _ defined? (11) -
protected
_ method _ defined? (11) -
public
_ method _ defined? (11) -
rb
_ autoload _ defined (11) -
rb
_ const _ defined (11) -
rb
_ const _ defined _ at (11) -
rb
_ cvar _ defined (11) -
rb
_ define _ alias (11) -
rb
_ define _ attr (11) -
rb
_ define _ class (11) -
rb
_ define _ class _ id (11) -
rb
_ define _ class _ under (11) -
rb
_ define _ class _ variable (11) -
rb
_ define _ const (11) -
rb
_ define _ global _ const (11) -
rb
_ define _ global _ function (11) -
rb
_ define _ hooked _ variable (11) -
rb
_ define _ method (11) -
rb
_ define _ method _ id (11) -
rb
_ define _ module (11) -
rb
_ define _ module _ function (11) -
rb
_ define _ module _ id (11) -
rb
_ define _ module _ under (11) -
rb
_ define _ private _ method (11) -
rb
_ define _ protected _ method (11) -
rb
_ define _ readonly _ variable (11) -
rb
_ define _ singleton _ method (11) -
rb
_ define _ variable (11) -
rb
_ define _ virtual _ variable (11) -
rb
_ dvar _ defined (11) -
rb
_ gvar _ defined (11) -
rb
_ ivar _ defined (11) -
rb
_ mod _ const _ defined (11) -
rb
_ mod _ define _ method (11) -
rb
_ mod _ method _ defined (11) -
rb
_ undefined (11) -
ruby 1
. 6 feature (11) -
singleton
_ method _ undefined (11) -
source
_ encoding (11) -
source
_ encoding _ name (11) -
task
_ defined? (11) -
to
_ s (2) -
undefine
_ final (11) -
undefine
_ finalizer (11) - with (2)
- リテラル (11)
- 終了処理 (11)
検索結果
先頭5件
-
static char * is
_ defined(VALUE self , NODE *node , char *buf) (32200.0) -
node を self = self で評価したとき値が得られそうな 式であれば、node の種別を表す文字列を返します。
node を self = self で評価したとき値が得られそうな
式であれば、node の種別を表す文字列を返します。 -
Data
. define(*args) -> Class (24244.0) -
Data クラスに新しいサブクラスを作って、それを返します。
...ドが定義されています。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
p fred.name # => "Fred"
p fred.age # => 5
//}
メンバの値を書き換えることはできません。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)......ンマッチに利用できます。
//emlist[例][ruby]{
class HTTPFetcher
Response = Data.define(:body)
NotFound = Data.define
def get(url)
# ダミーの実装
if url == "http://example.com/"
Response.new(body: "Current time is #{Time.now}")
else
NotFound.new
e......end
end
def fetch(url)
fetcher = HTTPFetcher.new
case fetcher.get(url)
in HTTPFetcher::Response(body)
body
in HTTPFetcher::NotFound
:NotFound
end
end
p fetch("http://example.com/") # => "Current time is 2023-01-10 10:00:53 +0900"
p fetch("http://example.com/404") # => :NotFo... -
Data
. define(*args) {|subclass| block } -> Class (24244.0) -
Data クラスに新しいサブクラスを作って、それを返します。
...ドが定義されています。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
p fred.name # => "Fred"
p fred.age # => 5
//}
メンバの値を書き換えることはできません。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)......ンマッチに利用できます。
//emlist[例][ruby]{
class HTTPFetcher
Response = Data.define(:body)
NotFound = Data.define
def get(url)
# ダミーの実装
if url == "http://example.com/"
Response.new(body: "Current time is #{Time.now}")
else
NotFound.new
e......end
end
def fetch(url)
fetcher = HTTPFetcher.new
case fetcher.get(url)
in HTTPFetcher::Response(body)
body
in HTTPFetcher::NotFound
:NotFound
end
end
p fetch("http://example.com/") # => "Current time is 2023-01-10 10:00:53 +0900"
p fetch("http://example.com/404") # => :NotFo... -
Rake
:: GemPackageTask # define (24201.0) -
タスクを定義します。
タスクを定義します。
GemPackageTask.new にブロックが与えられている場合に、自動的に呼び出されます。 -
Rake
:: PackageTask # define -> self (24201.0) -
タスクを定義します。
...タスクを定義します。
@raise RuntimeError バージョン情報をセットしていない場合に発生します。
初期化時に :noversion が指定されている場合は発生しません。... -
Rake
:: RDocTask # define -> self (24201.0) -
タスクを定義します。
タスクを定義します。 -
Rake
:: TestTask # define -> self (24201.0) -
タスクを定義します。
タスクを定義します。 -
Encoding
:: UndefinedConversionError # destination _ encoding -> Encoding (21300.0) -
エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。
...エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。
@see Encoding::UndefinedConversionError#source_encoding... -
Encoding
:: UndefinedConversionError # destination _ encoding _ name -> String (21300.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::UndefinedConversionError#destination_encoding... -
Object
# define _ singleton _ method(symbol) { . . . } -> Symbol (18338.0) -
self に特異メソッド name を定義します。
...m symbol メソッド名を 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 (18338.0) -
self に特異メソッド name を定義します。
...m symbol メソッド名を 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!"
//}...