るりまサーチ

最速Rubyリファレンスマニュアル検索!
244件ヒット [201-244件を表示] (0.082秒)
トップページ > クエリ:string[x] > クエリ:Extend[x]

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub

検索結果

<< < 1 2 3 >>

OpenURI::OpenRead#open(mode = &#39;r&#39;, perm = nil, options = {}) -> StringIO (106.0)

自身が表すリソースを取得して StringIO オブジェクトとして返します。 OpenURI.open_uri(self, *rest, &block) と同じです。

...ースを取得して StringIO オブジェクトとして返します。
OpenURI.open_uri(self, *rest, &block) と同じです。

ブロックを与えた場合は StringIO オブジェクトを引数としてブロックを
評価します。ブロックの終了時に StringIO は close され...
...ます。nil を返します。

返り値である StringIO オブジェクトは OpenURI::Meta モジュールで extend されています。

@param mode モードを文字列で与えます。Kernel.#open と同じです。

@param perm 無視されます。

@param options ハッシュを与...

クラス/メソッドの定義 (30.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

...ray を明示的に指定しても同じ)
class Foo
def bar
end
end

# 間違ったスーパークラスを指定するとエラー
class Foo < String
end
# => superclass mismatch for class Foo (TypeError)
//}

クラス定義式の中は self がそのクラスであることと、
limitのデ...
...ar'
end
end

# モジュールをクラスに extend すれば、モジュールのインスタンス
# メソッドがクラスメソッドになる
module Foo
def foo
end
end
class Hoge
extend
Foo
end
//}

extend
については、Object#extend を参照して
ください。

===[a:limit]...

Forwardable#delegate(hash) -> () (12.0)

メソッドの委譲先を設定します。

...のオブジェクトが値の
Hash を指定します。キーは Symbol、
String
かその配列で指定します。


//emlist[例][ruby]{
require 'forwardable'

class Zap
extend
Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def...

Forwardable#instance_delegate(hash) -> () (12.0)

メソッドの委譲先を設定します。

...のオブジェクトが値の
Hash を指定します。キーは Symbol、
String
かその配列で指定します。


//emlist[例][ruby]{
require 'forwardable'

class Zap
extend
Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def...
<< < 1 2 3 >>