694件ヒット
[1-100件を表示]
(0.089秒)
別のキーワード
種類
- インスタンスメソッド (520)
- 定数 (174)
キーワード
- <=> (12)
- === (12)
- =~ (9)
- DATA (12)
- NIL (8)
-
RUBY
_ COPYRIGHT (12) -
RUBY
_ DESCRIPTION (12) -
RUBY
_ ENGINE (12) -
RUBY
_ ENGINE _ VERSION (10) -
RUBY
_ PATCHLEVEL (12) -
RUBY
_ PLATFORM (12) -
RUBY
_ RELEASE _ DATE (12) -
RUBY
_ REVISION (12) -
RUBY
_ VERSION (12) -
SCRIPT
_ LINES _ _ (12) - STDERR (12)
- STDIN (12)
- STDOUT (12)
-
_ dump (12) - clone (12)
-
define
_ singleton _ method (24) - display (12)
-
enum
_ for (24) - hash (12)
- initialize (12)
-
initialize
_ copy (12) - inspect (12)
-
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) -
is
_ a? (12) - itself (12)
-
kind
_ of? (12) - methods (12)
-
object
_ id (12) -
pretty
_ print (12) -
pretty
_ print _ cycle (12) -
public
_ method (12) -
public
_ send (24) -
remove
_ instance _ variable (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) -
singleton
_ class (12) -
singleton
_ method (12) -
singleton
_ methods (12) - taint (9)
- tainted? (9)
-
to
_ enum (24) -
to
_ int (12) -
to
_ s (12) -
to
_ str (12) - untaint (9)
-
yield
_ self (16)
検索結果
先頭5件
-
Object
:: RUBY _ ENGINE -> String (12360.0) -
Ruby処理系実装の種類を表す文字列。
...Ruby処理系実装の種類を表す文字列。
例:
$ ruby-1.9.1 -ve 'p RUBY_ENGINE'
ruby 1.9.1p0 (2009-03-04 revision 22762) [x86_64-linux]
"ruby"
$ jruby -ve 'p RUBY_ENGINE'
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [i386-java]
"jruby"... -
Object
:: RUBY _ ENGINE _ VERSION -> String (12318.0) -
Ruby処理系実装のバージョンを表す文字列。
...Ruby処理系実装のバージョンを表す文字列。... -
Object
# define _ singleton _ method(symbol) { . . . } -> Symbol (12231.0) -
self に特異メソッド name を定義します。
...bol メソッド名を 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 (12231.0) -
self に特異メソッド name を定義します。
...bol メソッド名を 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
:: RUBY _ DESCRIPTION -> String (12224.0) -
Ruby の詳細を表す文字列。
...Ruby の詳細を表す文字列。
ruby -v で表示される内容が格納されています。... -
Object
:: RUBY _ VERSION -> String (12224.0) -
Ruby のバージョンを表す文字列。
...
Ruby のバージョンを表す文字列。
Ruby のバージョンは、major.minor.teeny という形式です。... -
Object
:: RUBY _ COPYRIGHT -> String (12218.0) -
Ruby のコピーライトを表す文字列。
...Ruby のコピーライトを表す文字列。... -
Object
:: RUBY _ REVISION -> Integer (12218.0) -
Ruby の Subversion でのリビジョン番号を表す Integer オブジェクトです。
...
Ruby の Subversion でのリビジョン番号を表す Integer オブジェクトです。... -
Object
:: RUBY _ REVISION -> String (12218.0) -
Ruby の GIT コミットハッシュを表す String オブジェクトです。
...
Ruby の GIT コミットハッシュを表す String オブジェクトです。... -
Object
# instance _ variable _ defined?(var) -> bool (12207.0) -
インスタンス変数 var が定義されていたら真を返します。
...//emlist[][ruby]{
class Fred
def initialize(p1, p2)
@a, @b = p1, p2
end
end
fred = Fred.new('cat', 99)
p fred.instance_variable_defined?(:@a) #=> true
p fred.instance_variable_defined?("@b") #=> true
p fred.instance_variable_defined?("@c") #=> false
//}
@see Object#instance_variable_......get,Object#instance_variable_set,Object#instance_variables...