22件ヒット
[1-22件を表示]
(0.037秒)
検索結果
-
Net
:: HTTPHeader # each _ value {|value| . . . . } -> () (24220.0) -
保持しているヘッダの値をブロックに渡し、呼びだします。
...れる文字列は ", " で連結したものです。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_value { |value| puts value }
# => gzip;q=1.0,deflate;q=0.6,identity;q=0.3
# => */*
# => Ruby
//}... -
win32
/ registry (24.0) -
win32/registry は Win32 プラットフォームでレジストリをアクセスするための ライブラリです。Win32 API の呼び出しに Win32API を使います。
...# 型指定付き値の書き込み
reg.write('foo', Win32::Registry::REG_SZ, 'bar') # 値の書き込み
reg.each_value { |name, type, data| ... } # 値の列挙
reg.each_key { |key, wtime| ... } # サブキーの列挙
reg.delete_value('foo')......WIN32OLE を使って WScript.Shell オブジェクト経由でアクセスする方法もあります。
require 'win32ole'
wsh = WIN32OLE.new('WScript.Shell')
value = wsh.RegRead 'HKLM\Software\Microsoft\Windows\...'
wsh.RegWrite 'HKCU\Software\foo\barfile\shell\open\command\\', '"C:\.....