600件ヒット
[301-400件を表示]
(0.075秒)
別のキーワード
ライブラリ
- ビルトイン (408)
- delegate (12)
- erb (12)
-
fiddle
/ import (12) - forwardable (48)
- json (12)
-
rdoc
/ context (24) -
rdoc
/ generator / darkfish (12) -
rdoc
/ generator / ri (12) -
rubygems
/ specification (12) - win32ole (36)
クラス
- BasicObject (84)
- Class (24)
- ERB (12)
-
Gem
:: Specification (12) - Object (156)
-
RDoc
:: Context (24) -
RDoc
:: Generator :: Darkfish (12) -
RDoc
:: Generator :: RI (12) -
Thread
:: Backtrace :: Location (48) - WIN32OLE (12)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12)
モジュール
- Enumerable (96)
-
Fiddle
:: Importer (12) - Forwardable (48)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (12)
キーワード
- ! (12)
- != (12)
- == (12)
- DelegateClass (12)
-
_ dump (12) -
absolute
_ path (12) - allocate (12)
-
base
_ label (12) - clone (12)
-
def
_ class (12) -
def
_ delegator (12) -
def
_ instance _ delegator (12) -
default
_ event _ sources (12) - delegate (12)
- dup (12)
- handler= (12)
-
initialize
_ classes _ and _ modules (12) -
initialize
_ clone (12) -
initialize
_ copy (12) -
initialize
_ dup (12) -
initialize
_ methods _ etc (12) - inspect (24)
-
instance
_ delegate (12) -
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
marshal
_ dump (12) - max (48)
-
method
_ missing (12) - min (48)
- new (12)
-
ole
_ activex _ initialize (12) -
singleton
_ method (12) - struct (12)
-
to
_ json (12) -
to
_ s (24) -
yaml
_ initialize (12)
検索結果
先頭5件
-
Enumerable
# min {|a , b| . . . } -> object | nil (7.0) -
ブロックの評価結果で各要素の大小判定を行い、最小の要素、もしくは最小の n 要素が昇順で入った配列を返します。 引数を指定しない形式では要素が存在しなければ nil を返します。 引数を指定する形式では、空の配列を返します。
...の要素を返すかは不定です。
@param n 取得する要素数。
//emlist[例][ruby]{
class Person
attr_reader :name, :age
def initialize(name, age)
@name = name
@age = age
end
end
people = [
Person.new("sato", 55),
Person.new("sato", 33),
Person.new("sato", 11),... -
Enumerable
# min(n) {|a , b| . . . } -> Array (7.0) -
ブロックの評価結果で各要素の大小判定を行い、最小の要素、もしくは最小の n 要素が昇順で入った配列を返します。 引数を指定しない形式では要素が存在しなければ nil を返します。 引数を指定する形式では、空の配列を返します。
...の要素を返すかは不定です。
@param n 取得する要素数。
//emlist[例][ruby]{
class Person
attr_reader :name, :age
def initialize(name, age)
@name = name
@age = age
end
end
people = [
Person.new("sato", 55),
Person.new("sato", 33),
Person.new("sato", 11),... -
Fiddle
:: Importer # struct(signature) -> Class (7.0) -
C の構造体型に対応する Ruby のクラスを構築して返します。
...成します。
このメソッドが返すクラスには以下のメソッドが定義されています
* クラスメソッド malloc
* initialize
* to_ptr
* to_i
* 構造体の各メンバへのアクセサ
返されるクラスは Fiddle::CStruct を継承しています。詳しく... -
Forwardable
# def _ delegator(accessor , method , ali = method) -> () (7.0) -
メソッドの委譲先を設定します。
...stance_delegator の別名になります。
例:
require 'forwardable'
class MyQueue
extend Forwardable
attr_reader :queue
def initialize
@queue = []
end
def_delegator :@queue, :push, :mypush
end
q = MyQueue.new
q.mypush 42
q.queue # => [42]
q.push 23... -
Forwardable
# def _ instance _ delegator(accessor , method , ali = method) -> () (7.0) -
メソッドの委譲先を設定します。
...stance_delegator の別名になります。
例:
require 'forwardable'
class MyQueue
extend Forwardable
attr_reader :queue
def initialize
@queue = []
end
def_delegator :@queue, :push, :mypush
end
q = MyQueue.new
q.mypush 42
q.queue # => [42]
q.push 23... -
Forwardable
# delegate(hash) -> () (7.0) -
メソッドの委譲先を設定します。
...例:
require 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end
end
zap = Zap.new
zap.length # => 5
zap.first # => "foo"
zap.last... -
Forwardable
# instance _ delegate(hash) -> () (7.0) -
メソッドの委譲先を設定します。
...例:
require 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end
end
zap = Zap.new
zap.length # => 5
zap.first # => "foo"
zap.last... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (7.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, age)
@name, @age = name, age
end
end
tanaka = Person.new("tanaka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tan... -
Kernel
# DelegateClass(superclass) -> object (7.0) -
クラス 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]
//}...