91件ヒット
[1-91件を表示]
(0.072秒)
種類
- インスタンスメソッド (44)
- ライブラリ (44)
- 文書 (3)
ライブラリ
-
rdoc
/ context (11) -
rexml
/ document (22)
クラス
-
RDoc
:: Context :: Section (11) -
RDoc
:: Options (11) -
REXML
:: DocType (22)
キーワード
-
NEWS for Ruby 3
. 1 . 0 (3) -
attribute
_ of (11) - cgi (11)
-
external
_ id (11) - rdoc (11)
-
rexml
/ document (11) - rss (11)
検索結果
先頭5件
-
RDoc
:: Context :: Section # title -> String | nil (18302.0) -
section のタイトルを返します。
section のタイトルを返します。 -
RDoc
:: Options # title -> String | nil (18302.0) -
ドキュメントのタイトルを返します。指定されていない場合は nil を返します。
ドキュメントのタイトルを返します。指定されていない場合は nil を返します。 -
rss (942.0)
-
RSS を扱うためのライブラリです。
...す。
=== 参考
* RSS 0.91 http://backend.userland.com/rss091
* RSS 1.0 http://purl.org/rss/1.0/spec
* RSS 2.0 http://www.rssboard.org/rss-specification
* Atom 1.0 https://www.ietf.org/rfc/rfc4287.txt
=== 注意
RSS ParserはRSS 0.9x/1.0/2.0, Atom 1.0 をサポートしています......れます.
Hash:
{
:href => "...",
:type => "...",
:title => "...",
:media => "...",
:charset => "...",
:alternate => "...",
}
連想配列:
[
[:href, "..."],
[:type, "..."],
[:title, "..."],
[:media, "..."],
[:charset, "..."],
[:alternate,......作成するには
RSS Makerが便利です.
以下のように使います.
require "rss"
rss = RSS::Maker.make("バージョン") do |maker|
maker.XXX = YYY
...
end
===== シンプルなRSS
例えば,
* http://example.com/にある
* Example Siteという説明文を... -
rdoc (330.0)
-
RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。
...れば、'rdoc' コマンドでドキュメントが生成できます。
(Windows では 'rdoc.bat' です)
$ rdoc [options] [names...]
"rdoc --help" と打てば、最新のオプションに関する情報が得られます。
$ rdoc
このコマンドでカレントディレクトリ以......8)。
: --template name
出力生成時に使うテンプレートを指定する(デフォルトは 'html')。実際には
これで $: の中のディレクトリの rdoc/generators/xxxx_generator が
使われる。 (xxxx はフォーマッタによって異なる)。
: --title text......) { |line, address| ... }
メソッド名の直後に ':yields: …' を含むコメントを書くと、この出力を上書
きできます。
def fred # :yields: index, position
...
yield line, address
上のようにすると、以下の出力になります。
fred() { |in... -
NEWS for Ruby 3
. 1 . 0 (294.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...private def foo = puts "Hello" はパースされないことに注意してください。 17398
== コマンドラインオプション
* --disable-gems は"デバッグ専用"として明示的に宣言されました。デバッグ専用以外のコードでは使用しないでください......t: T
def initialize: (T output) -> void
end
//}
* ジェネリックな型エイリアスが定義できるようになりました。 https://github.com/ruby/rbs/pull/823
//emlist{
# Defines a generic type `list`.
type list[T] = [ T, list[T] ]
| nil
type str_list = list[String]......ラー位置を表示します。
//emlist[例][ruby]{
title = json[:article][:title]
//}
jsonがnilの時、
//emlist{
$ ruby test.rb
test.rb:2:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
title = json[:article][:title]
^^^^^^^^^^
//}
json[:article] が返す... -
REXML
:: DocType # external _ id -> String | nil (219.0) -
DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。
...html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.name # => "html"
doctype.external_id # => "PUBLIC"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT books (book+)>
<!ELEMENT book (title,author)>... -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (213.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
...REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
]>
EOS
p doctype.attribute_of("book", "publisher") # => "foobar publisher"
p doctype.attribute_of("bar", "foo") # => nil
p doctype.attribute_of("book", "baz") # => nil
p doctype.attribute_of("book", "title") # =>... -
rexml
/ document (168.0) -
DOM スタイルの XML パーサ。
...'pp'
Bookmark = Struct.new(:href, :title, :desc)
doc = REXML::Document.new(<<XML)
<?xml version="1.0" encoding="UTF-8" ?>
<xbel version="1.0">
<bookmark href="http://www.ruby-lang.org/ja/">
<title>オブジェクト指向スクリプト言語 Ruby</title>
<desc>Rubyの公式サイト</d......clear-code.com/">
<title>最速Rubyリファレンスマニュアル検索! | るりまサーチ</title>
<desc>Rubyリファレンスマニュアルを全文検索できる。
とても便利。
</desc>
</bookmark>
<bookmark href="https://github.com/rurema/bitclust">
<title>rur......itHub</title>
</bookmark>
<bookmark href="https://rubygems.org/gems/bitclust-core" />
</xbel>
XML
bookmarks = REXML::XPath.match(doc, "/xbel/bookmark").map do |bookmark|
href = bookmark.attribute("href").value
title_element = bookmark.elements["title"]
title = title_element ? title_eleme... -
cgi (60.0)
-
CGI プログラムの支援ライブラリです。
...リです。
CGI プロトコルの詳細については以下の文書を参照してください。
* https://tools.ietf.org/html/draft-coar-cgi-v11-03
* 3875: The Common Gateway Interface (CGI) Version 1.1
* https://www.w3.org/CGI/
=== 使用例
==== フォームフィールドの値を......る
//emlist[][ruby]{
require "cgi"
cgi = CGI.new("html3") # HTML生成メソッドを追加
cgi.out() do
cgi.html() do
cgi.head{ cgi.title{"TITLE"} } +
cgi.body() do
cgi.form() do
cgi.textarea("get_text") +
cgi.br +
cgi.submit
end +
cgi.pre() do......(
"params: " + cgi.params.inspect + "\n" +
"cookies: " + cgi.cookies.inspect + "\n" +
ENV.collect() do |key, value|
key + " --> " + value + "\n"
end.join("")
)
end
end
end
end
# HTML生成メソッドを追加
CGI.new("html3")...