るりまサーチ

最速Rubyリファレンスマニュアル検索!
453件ヒット [1-100件を表示] (0.158秒)
トップページ > クエリ:I[x] > クエリ:u[x] > クエリ:name[x] > クエリ:define[x]

別のキーワード

  1. _builtin koi8_u
  2. util u
  3. erb u
  4. encoding koi8_u
  5. matrix u

検索結果

<< 1 2 3 ... > >>

Encoding::UndefinedConversionError#destination_encoding_name -> String (30401.0)

エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

@see Encoding::UndefinedConversionError#destination_encoding...

Encoding::UndefinedConversionError#source_encoding_name -> Encoding (27401.0)

エラーを発生させた変換の変換元のエンコーディングを文字列で返します。

...エラーを発生させた変換の変換元のエンコーディングを文字列で返します。

@see Encoding::UndefinedConversionError#source_encoding...

Data.define(*args) {|subclass| block } -> Class (24374.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)
fr...
...//emlist[例][ruby]{
class HTTPFetcher
Response = Data.define(:body)
NotFound = Data.define

def get(url)
# ダミーの実装
i
f url == "http://example.com/"
Response.new(body: "Current time is #{Time.now}")
else
NotFound.new
end
end
end

def fetch(url)
fetch...
...HTTPFetcher.new
case fetcher.get(url)
i
n HTTPFetcher::Response(body)
body
i
n 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") # => :NotFound
//}

@param args 値オブジェ...

REXML::UndefinedNamespaceException (24000.0)

XMLのパース中に、定義されていない名前空間が現れた場合に発生する 例外です。

XMLのパース中に、定義されていない名前空間が現れた場合に発生する
例外です。

BasicObject#singleton_method_undefined(name) -> object (21519.0)

特異メソッドが Module#undef_method または undef により未定義にされた時にインタプリタから呼び出されます。

...特異メソッドが Module#undef_method または
u
ndef により未定義にされた時にインタプリタから呼び出されます。

通常のメソッドの未定義に対するフックには
Module#method_undefined を使います。

@param name 未定義にされたメソッド名...
.../emlist[例][ruby]{
class Foo
def singleton_method_undefined(name)
puts "singleton method \"#{name}\" was undefined"
end
end

obj = Foo.new
def obj.foo
end
def obj.bar
end

class << obj
u
ndef_method :foo
end
obj.instance_eval {undef bar}

#=> singleton method "foo" was undefined
# single...
...ton method "bar" was undefined
//}

@see Module#method_undefined,BasicObject#singleton_method_added,BasicObject#singleton_method_removed , d:spec/def#undef...

絞り込み条件を変える

Encoding::UndefinedConversionError (21030.0)

エンコーディング変換後の文字が存在しない場合に発生する例外。

...しない場合に発生する例外。

U
TF-8 にしかない文字を EUC-JP に変換しようとした場合などに発生します。

//emlist[例][ruby]{
"\u2603".encode(Encoding::EUC_JP)
#=> Encoding::UndefinedConversionError: U+2603 from UTF-8 to EUC-JP
//}


変換が多段階でなされ...
...//emlist[例][ruby]{
ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP")
# ISO-8859-1 -> UTF-8 -> EUC-JP
begin
ec.convert("\xa0")
# NO-BREAK SPACE, which is available in UTF-8 but not in EUC-JP.
rescue Encoding::UndefinedConversionError
p $!.source_encoding #=> #<Encoding:UTF-8>...
...p $!.destination_encoding #=> #<Encoding:EUC-JP>
p $!.source_encoding_name #=> "UTF-8"
p $!.destination_encoding_name #=> "EUC-JP"
puts $!.error_char.dump #=> "\u{a0}"
p $!.error_char.encoding #=> #<Encoding:UTF-8>
end
//}...

VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super) (18612.0)

super のサブクラスとして新しい Ruby クラスを、outer の定数として定義し て返します。

...super のサブクラスとして新しい Ruby クラスを、outer の定数として定義し
て返します。

@param outer 定義するクラスが定数として所属するクラス

@param name クラス名

@param super 継承元のクラス。NULL を指定した場合は Object クラ...
...

@raise TypeError 引数 name と同じ名前の定数が既に存在し、それが
Class オブジェクトではない場合に発生します。...
...

@raise TypeError 引数 name と同じ名前の定数が既に存在し、それが
Class オブジェクトではない場合に発生します。

@raise TypeError 定義済みのクラスと継承元のクラスが一致しない場合に発生
します。...

void rb_define_global_function(const char *name, VALUE (*func)(), int argc) (18538.0)

関数 name を定義します。 func と argc は rb_define_method と同じです。

... name を定義します。
func と argc は rb_define_method と同じです。

例:
static VALUE
return_obj_dup(VALUE obj)
{
VALUE dup = rb_obj_dup(obj); // オブジェクトを複製
return dup;
}

void Init_func() {
rb_define_global_function("dup_ob...
...j", return_obj_dup, 1); // 関数 dup_objを定義しています。
}...

void rb_define_module_function(VALUE module, const char *name, VALUE (*func)(), int argc) (18532.0)

モジュール module にモジュール関数 name を定義します。 func と argc は rb_define_method と同じです。

...モジュール module にモジュール関数 name を定義します。
func と argc は rb_define_method と同じです。...

void rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func)(), int argc) (18532.0)

obj に特異メソッド name を定義します。 メソッドの実体を func に関数ポインタで与え、その関数がとる 引数のタイプを argc に渡します。argc のフォーマットに ついては rb_define_method の記述を参照してください。

...obj に特異メソッド name を定義します。
メソッドの実体を func に関数ポインタで与え、その関数がとる
引数のタイプを argc に渡します。argc のフォーマットに
ついては rb_define_method の記述を参照してください。...

絞り込み条件を変える

<< 1 2 3 ... > >>