Ruby 2.4.0 リファレンスマニュアル > ライブラリ一覧 > resolvライブラリ > Resolv::IPv6クラス

class Resolv::IPv6

クラス・モジュールの継承リスト: Resolv::IPv6 < Object < Kernel < BasicObject

要約

IPv6 のアドレスを表すクラスです。

特異メソッド

定義 説明
create(address) -> Resolv::IPv6

引数 address で指定した文字列から Resolv::IPv6 のインスタンスを生成します。

new(address) -> Resolv::IPv6

16 byte の文字列 address から Resolv::IPv6 のインスタンスを生成します。

インスタンスメソッド

定義 説明
address -> String

IPv6アドレスを表す 16 byte の文字列(バイト列)を返します。

to_name -> Resolv::DNS::Name

"h.g.f.e.d.c.b.a.ip6.arpa." という DNS 名を返します。

to_s -> String

IPv6 アドレスの文字列表現を返します。

定数

定義 説明
Regex -> Regexp

IPv6のアドレスの正規表現です。 Resolv::IPv6::Regex_6Hex4Dec, Resolv::IPv6::Regex_8Hex, Resolv::IPv6::Regex_CompressedHex, Resolv::IPv6::Regex_CompressedHex4Dec, のいずれかとマッチする文字列とマッチします。

Regex_6Hex4Dec -> Regexp
Regex_8Hex -> Regexp
Regex_CompressedHex -> Regexp
Regex_CompressedHex4Dec -> Regexp

IPv6の各文字列表記とマッチする正規表現です。順に

  • a:b:c:d:e:f:w.x.y.z
  • a:b:c:d:e:f:g:h
  • a::b
  • a::b:w.x.y.z

という文字列とマッチします。

継承したメソッド

! != __id__ __send__ instance_eval instance_exec method_missing singleton_method_added singleton_method_removed singleton_method_undefined !~ <=> == === =~ _dump class clone define_singleton_method display enum_for eql? equal? extend freeze frozen? hash initialize initialize_copy inspect instance_of? instance_variable_defined? instance_variable_get instance_variable_set instance_variables is_a? itself marshal_dump marshal_load method methods nil? object_id pretty_inspect pretty_print pretty_print_cycle pretty_print_inspect pretty_print_instance_variables private_methods protected_methods psych_to_yaml public_method public_methods public_send remove_instance_variable respond_to? respond_to_missing? send singleton_class singleton_method singleton_methods taint tainted? tap to_a to_ary to_hash to_int to_io to_proc to_regexp to_str trust untaint untrust untrusted? .yaml_tag ::ARGF ::ARGV ::DATA ::ENV ::FALSE ::NIL ::RUBY_COPYRIGHT ::RUBY_DESCRIPTION ::RUBY_ENGINE ::RUBY_ENGINE_VERSION ::RUBY_PATCHLEVEL ::RUBY_PLATFORM ::RUBY_RELEASE_DATE ::RUBY_REVISION ::RUBY_VERSION ::SCRIPT_LINES__ ::STDERR ::STDIN ::STDOUT ::TOPLEVEL_BINDING ::TRUE