3331件ヒット
[101-200件を表示]
(0.171秒)
別のキーワード
ライブラリ
- ビルトイン (2648)
-
bigdecimal
/ util (7) - erb (24)
-
fiddle
/ import (24) - json (72)
-
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 (24)
-
rexml
/ document (24) -
rexml
/ streamlistener (12) - set (27)
- timeout (16)
- tsort (93)
- win32ole (24)
クラス
-
ARGF
. class (300) - Array (48)
- BasicObject (144)
- BigDecimal (12)
- Class (76)
- Complex (12)
- Date (12)
- DateTime (12)
- ERB (24)
-
Enumerator
:: Lazy (6) - Exception (24)
- FalseClass (60)
- Hash (79)
- IO (12)
- Integer (12)
-
JSON
:: Parser (12) - Method (213)
- Module (696)
-
Net
:: HTTPResponse (12) - NilClass (170)
- Object (444)
- OptionParser (168)
- Proc (26)
-
REXML
:: CData (24) - Range (12)
- Rational (12)
- Regexp (24)
-
RubyVM
:: InstructionSequence (12) - Set (12)
- Struct (12)
- Thread (36)
-
Thread
:: Backtrace :: Location (48) - Time (12)
- TracePoint (36)
- TrueClass (60)
- UnboundMethod (48)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12)
モジュール
- Enumerable (168)
-
Fiddle
:: Importer (24) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (16)
-
REXML
:: StreamListener (12) -
Rake
:: TaskManager (24) - TSort (93)
キーワード
- ! (12)
- != (12)
- & (36)
- < (12)
- << (14)
- <=> (12)
- == (24)
- === (20)
- =~ (7)
- >> (14)
- [] (12)
- ^ (36)
-
_ _ send _ _ (24) -
_ dump (12) -
_ load (12) -
absolute
_ path (12) - accept (12)
-
add
_ trace _ func (12) - allocate (12)
- ancestors (12)
-
append
_ features (12) - argv (12)
- arity (24)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - autoload (12)
- backtrace (12)
-
base
_ label (12) - bind (12)
- binmode (12)
- call (24)
-
callee
_ id (12) -
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
class
_ variables (12) - classify (12)
- clone (36)
- close (12)
- closed? (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ missing (12) -
const
_ source _ location (12) - constants (12)
-
def
_ class (12) -
def
_ module (12) -
default
_ event _ sources (12) -
define
_ method (24) -
define
_ singleton _ method (24) -
define
_ task (12) -
defined
_ class (12) - display (12)
- dup (24)
-
each
_ char (24) -
each
_ codepoint (24) -
each
_ entry (24) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - eager (6)
- entitydecl (12)
- eof (12)
- eof? (12)
- extend (12)
- file (12)
- filename (12)
-
fixed
_ encoding? (12) - getbyte (12)
- getc (12)
- gets (36)
- handler= (12)
- include (12)
- include? (12)
- included (12)
- inherited (12)
- initialize (12)
-
initialize
_ copy (12) -
inplace
_ mode (12) -
inplace
_ mode= (12) - inspect (72)
-
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) -
json
_ creatable? (12) -
kind
_ of? (12) - lambda? (12)
-
marshal
_ dump (12) -
marshal
_ load (12) - max (48)
- merge (24)
-
method
_ added (12) -
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (12) -
method
_ removed (12) -
method
_ undefined (12) - methods (12)
- min (48)
-
module
_ eval (24) -
module
_ exec (12) - name (24)
- new (12)
- nil? (12)
- on (144)
-
original
_ name (24) - owner (24)
- parameters (12)
- parse (12)
- path (12)
- prepend (12)
-
prepend
_ features (12) - prepended (12)
-
pretty
_ print (12) -
pretty
_ print _ cycle (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) - rationalize (24)
- read (12)
- readbyte (24)
- readchar (12)
- receiver (12)
- refine (12)
- reject (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) -
remove
_ method (12) - replace (12)
-
respond
_ to? (12) -
respond
_ to _ missing? (12) - send (24)
-
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) -
strongly
_ connected _ components (12) - struct (12)
- subclasses (4)
-
super
_ method (11) - superclass (12)
- timeout (16)
-
to
_ a (36) -
to
_ ary (24) -
to
_ bn (12) -
to
_ c (12) -
to
_ d (7) -
to
_ f (12) -
to
_ h (31) -
to
_ hash (12) -
to
_ i (12) -
to
_ int (12) -
to
_ json (168) -
to
_ proc (24) -
to
_ r (12) -
to
_ regexp (12) -
to
_ s (96) -
to
_ set (24) -
to
_ str (12) - tsort (12)
-
tsort
_ each (23) - unbind (12)
-
undef
_ method (12) - union (12)
- value (24)
- | (36)
検索結果
先頭5件
-
Object
# singleton _ class -> Class (6245.0) -
レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。
...れ 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... -
ERB
# def _ class(superklass=Object , methodname=& # 39;erb& # 39;) -> Class (6237.0) -
変換した Ruby スクリプトをメソッドとして定義した無名のクラスを返します。
...変換した Ruby スクリプトをメソッドとして定義した無名のクラスを返します。
@param superklass 無名クラスのスーパークラス
@param methodname メソッド名
//emlist[例][ruby]{
require 'erb'
class MyClass_
def initialize(arg1, arg2)
@arg1 = arg1......; @arg2 = arg2
end
end
filename = 'example.rhtml' # @arg1 と @arg2 が使われている example.rhtml
erb = ERB.new(File.read(filename))
erb.filename = filename
MyClass = erb.def_class(MyClass_, 'render()')
print MyClass.new('foo', 123).render()
# => test1foo
# test2123
//}... -
Module
# class _ eval {|mod| . . . } -> object (6157.0) -
モジュールのコンテキストで文字列 expr またはモジュール自身をブロックパラメータとするブロックを 評価してその結果を返します。
...。
つまり、そのモジュールの定義式の中にあるかのように実行されます。
ただし、ローカル変数は module_eval/class_eval の外側のスコープと共有します。
定数とクラス変数のスコープは、文字列が与えられた場合とブロック......できます。
//emlist[例][ruby]{
class C
end
a = 1
C.class_eval %Q{
def m # メソッドを動的に定義できる。
return :m, #{a}
end
}
p C.new.m #=> [:m, 1]
//}
//emlist[定数のスコープが異なる例][ruby]{
class C
end
# ブロックが渡され......ルに定数 X を定義する。
C.class_eval { X = 1 }
# 文字列が渡された場合は、モジュール定義式内と同じスコープになる。つまり、この場合は
# class C
# X = 2
# end
# と書いたのと同じ意味になる。
C.class_eval 'X = 2'
p X #=> 1
p C::X #=>... -
Module
# class _ eval(expr , fname = "(eval)" , lineno = 1) -> object (6157.0) -
モジュールのコンテキストで文字列 expr またはモジュール自身をブロックパラメータとするブロックを 評価してその結果を返します。
...。
つまり、そのモジュールの定義式の中にあるかのように実行されます。
ただし、ローカル変数は module_eval/class_eval の外側のスコープと共有します。
定数とクラス変数のスコープは、文字列が与えられた場合とブロック......できます。
//emlist[例][ruby]{
class C
end
a = 1
C.class_eval %Q{
def m # メソッドを動的に定義できる。
return :m, #{a}
end
}
p C.new.m #=> [:m, 1]
//}
//emlist[定数のスコープが異なる例][ruby]{
class C
end
# ブロックが渡され......ルに定数 X を定義する。
C.class_eval { X = 1 }
# 文字列が渡された場合は、モジュール定義式内と同じスコープになる。つまり、この場合は
# class C
# X = 2
# end
# と書いたのと同じ意味になる。
C.class_eval 'X = 2'
p X #=> 1
p C::X #=>... -
Module
# class _ variable _ defined?(name) -> bool (6138.0) -
name で与えられた名前のクラス変数がモジュールに存在する場合 true を 返します。
...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') #=> false
//}... -
Module
# class _ variables(inherit = true) -> [Symbol] (6138.0) -
クラス/モジュールに定義されているクラス変数の名前の配列を返します。
...ジュールのクラス変数を含みます。
//emlist[例][ruby]{
class One
@@var1 = 1
end
class Two < One
@@var2 = 2
end
One.class_variables # => [:@@var1]
Two.class_variables # => [:@@var2, :@@var1]
Two.class_variables(false) # => [:@@var2]
//}
@see Module.constants,... -
Module
# public _ class _ method(*name) -> self (6133.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
Module
# public _ class _ method(names) -> self (6133.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
Module
# singleton _ class? -> bool (6132.0) -
self が特異クラスの場合に true を返します。そうでなければ false を返し ます。
...self が特異クラスの場合に true を返します。そうでなければ false を返し
ます。
//emlist[例][ruby]{
class C
end
C.singleton_class? # => false
C.singleton_class.singleton_class? # => true
//}...