181件ヒット
[101-181件を表示]
(0.014秒)
キーワード
- cgi (12)
-
cgi
/ session (12) - fiddle (12)
-
fiddle
/ types (12) -
irb
/ completion (12) - open-uri (12)
- rdoc (12)
-
rdoc
/ markdown (12) -
rexml
/ parsers / pullparser (12) -
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / streamparser (12) - rss (12)
-
test
/ unit (1) -
webrick
/ cgi (12) -
win32
/ registry (12) - yaml (12)
検索結果
-
rexml
/ parsers / streamparser (13.0) -
ストリーム式の XML パーサ。
...rexml/parsers/streamparser'
require 'rexml/streamlistener'
xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<!DOCTYPE root SYSTEM "foo" [
<!ELEMENT root (a+)>
<!ELEMENT a>
<!ENTITY bar "barbarbarbar">
<!ATTLIST a att CDATA #REQUIRED xyz......istener.new).parse
# >> [:xmldecl, "1.0", "UTF-8", nil]
# >> [:text, "\n"]
# >> [:instruction, "xml-stylesheet", " type=\"text/css\" href=\"style.css\""]
# >> [:text, "\n"]
# >> [:doctype, "root", "SYSTEM", "foo", nil]
# >> [:elementdecl, "<!ELEMENT root (a+)"]
# >> [:elementdecl, "<!ELEMENT a"]
# >......example.org/foobar.dtd"]]
# >> [:entitydecl, ["HTMLsymbol", "PUBLIC", "-//W3C//ENTITIES Symbols for XHTML//EN", "xhtml-symbol.ent", "%"]]
# >> [:doctype_end]
# >> [:text, "\n"]
# >> [:tag_start, "root", {"xmlns:foo"=>"http://example.org/foo", "xmlns:bar"=>"http://example.org/bar"}]
# >> [:cdata, "cd... -
win32
/ registry (13.0) -
win32/registry は Win32 プラットフォームでレジストリをアクセスするための ライブラリです。Win32 API の呼び出しに Win32API を使います。
...= reg['foo'] # 値の読み込み
value = reg['foo', Win32::Registry::REG_SZ] # 型を限定した読み込み
type, value = reg.read('foo') # 値の読み込み
reg['foo'] = 'bar' # 値の書き込み
reg['f......= 'bar' # 型指定付き値の書き込み
reg.write('foo', Win32::Registry::REG_SZ, 'bar') # 値の書き込み
reg.each_value { |name, type, data| ... } # 値の列挙
reg.each_key { |key, wtime| ... } # サブキーの列挙
reg.delete_value('foo')... -
fiddle (7.0)
-
*.dllや*.soなど、ダイナミックリンクライブラリを扱うためのライブラリです。
...iddle::Importer
dlload "libc.so.6"
QsortCallback = bind("void *qsort_callback2(void*,void*)"){|ptr1,ptr2|
ptr1[0] <=> ptr2[0]
}
type
extern 'void qsort(void *, int, int, void *)'
end
buff = "3465721"
M.qsort(buff, buff.size, 1, M::QsortCallback)
p buff #=> "1234... -
irb
/ completion (7.0) -
irb の completion 機能を提供するライブラリです。
...foo.is_a? foo.to_a
foo.dup foo.kind_of? foo.to_s
foo.eql? foo.method foo.type
foo.equal? foo.methods foo.untaint
foo.extend foo.nil?
foo.freeze foo.priv... -
open-uri (7.0)
-
http/ftp に簡単にアクセスするためのクラスです。 Kernel.#open を再定義します。
...ang.org/en") {|f|
f.each_line {|line| p line}
p f.base_uri # <URI::HTTP:0x40e6ef2 URL:http://www.ruby-lang.org/en/>
p f.content_type # "text/html"
p f.charset # "iso-8859-1"
p f.content_encoding # []
p f.last_modified # Thu Dec 05 02:45:02 UTC 2002
}... -
rdoc
/ markdown (7.0) -
Markdown 形式で記述されたドキュメントを rdoc 上で解析するための サブライブラリです。
...れを常に RDoc の出力に含める事はできま
せん。この拡張はデフォルトでは無効になっています。
例:
<style type="text/css">
h1 { font-size: 3em }
</style>
==== 定義リスト
RDoc::Markdown#definition_lists を設定する事で定義リストを出力... -
test
/ unit (7.0) -
ユニットテストを行うためのライブラリです。
...Verbose. Show progress processing files.
-n, --name PATTERN Filter test names on pattern.
--jobs-status [TYPE] Show status of jobs every file; Disabled when --jobs isn't specified.
-j, --jobs N Allow run tests with N jobs a......Base directory of test suites.
-x, --exclude PATTERN Exclude test files on pattern.
-Idirectory Add library load path
--[no-]gc-stress Set GC.stress as true
複数のテストを一度に行う場合、以下のように書いた... -
yaml (7.0)
-
構造化されたデータを表現するフォーマットであるYAML (YAML Ain't Markup Language) を扱うためのライブラリです。
...end
p YAML.load(<<~EOS)
---
!ruby/object:Foo
EOS
# => #<Foo::Bar:0xf73907b8>
//}
=== 注意
無名クラスを YAML 形式に変換すると TypeError が発生します。また、
IO や Thread オブジェクトなどはインスタンス変数がオブジェク
トの状態を保持し......して扱える
* "y" や "n" は真偽値として扱われない
=== 参考
YAML Specification
* https://yaml.org/spec/
* https://yaml.org/type/
YAML4R
* http://yaml4r.sourceforge.net/
* http://yaml4r.sourceforge.net/cookbook/(http://yaml.org/YAML_for_ruby.html)
* http://yaml4r.sourcefo...