config/boot.rb のコードの中に、RubyGemsの定数を使うものがあったので、irb で調べてみた。
irb から require 'rubygems' をして、Gem.class でGemのタイプを調べたら Module だった。次に、puts Gem.methtods.sort.join("\t") でGemのメソッドをソートして表示した。また、puts Gem.constants.sort.join("\t") でGemの定数を表示した。boot.rb のコードでは、Gem::RubyGemsVersion が使用してあったのでその値を確認した。 C:\Users\******>irb irb(main):001:0> require 'rubygems' => false irb(main):002:0> Gem.class => Module irb(main):003:0> puts Gem.methods.sort.join("\t") < <= <=> == === =~ > >= __id__ __send__ activate all_load_paths ancestors autoload autoload ? available? binary_mode bindir cache class class_eval class_variable_defined? class_variables clear_paths clone config_file configuration configuration= const_defined? const_get const_missing const_set constants datadir default_bindir default_dir default_ exec_format default_path default_sources default_system_source_cache_dir default_user_source_cache_dir deflate dir display dup ensure_gem_subdi rectories eql? equal? extend find_files freeze frozen? gem gunzip gzip hash id include? included_modules inflate inspect instance_eval instance_method instance_methods instance_of? instance_variable_defined? instance_variable_get instance_variable_set instance_variables is_a? kind_of? latest_load_paths load_pat h_insert_index loaded_specs manage_gems marshal_version method method_d efined? methods module_eval name nil? object_id path platform s platforms= post_install post_install_hooks post_uninstall post_uninstall_hooks pre_install pre_install_hooks pre_uninstall pre_uninstall_hooks prefix private_class_method private_instance_methods private_method_defined? private_methods protected_instance_methods protected_method_defined? protected_methods public_class_method public_instance_methods public_method_defined? public_methods read_binary refresh require required_location respond_to? ruby ruby_engine ruby_version searcher send singleton_methods source_index sources sources= suffix_pattern suffixes taguri taguri= taint tainted? to_a to_s to_yaml to_yaml_properties to_yaml_style type untaint use_paths user_dir user_home win_platform? yaml_as yaml_tag_class_name yaml_tag_read_class => nil irb(main):005:0> puts Gem.constants.sort.join("\t") Builder Cache CommandLineError ConfigFile ConfigMap ConsoleU I DIRECTORIES DefaultUserInteraction Dependency DependencyError DependencyRemovalException DocumentError EndOfYAMLException Exceptio n FilePermissionError FormatException GemNotFoundException GemNotIn HomeException GemPathSearcher InstallError InvalidSpecificationException LoadError MARSHAL_SPEC_DIR MUTEX OperationNotSupportedError Platform RemoteError RemoteInstallationCancelled RemoteInstallati onSkipped RemoteSourceException Requirement RubyGemsPackageVersion RubyGemsVersion SilentUI SourceIndex SpecFetcher Specification StreamUI SystemExitException UserInteraction VerificationError Version WIN_PATTERNS YAML_SPEC_DIR => nil irb(main):006:0> Gem::RubyGemsVersion => "1.3.0" RubyGems を使いこなすのは大変そうだ。
by tnomura9
| 2008-10-21 07:16
| Ruby
|
Comments(0)
|
カテゴリ
新型コロナウイルス 主インデックス Haskell 記事リスト 圏論記事リスト 考えるということのリスト 考えるということ ラッセルのパラドックス Haskell Prelude Ocaml ボーカロイド 圏論 jQuery デモ HTML Python ツールボックス XAMPP Ruby ubuntu WordPress 脳の話 話のネタ リンク 幸福論 キリスト教 心の話 メモ 電子カルテ Dojo JavaScript C# NetWalker ed と sed HTML Raspberry Pi C 言語 命題論理 以前の記事
最新のトラックバック
最新のコメント
ファン
記事ランキング
ブログジャンル
画像一覧
|
ファン申請 |
||