るりまサーチ

最速Rubyリファレンスマニュアル検索!
108件ヒット [1-100件を表示] (0.085秒)

別のキーワード

  1. openssl to_text
  2. prettyprint text
  3. cgi text_field
  4. cgi/html text_field
  5. rexml/document text

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

RDoc::Text#parse(text) -> RDoc::Markup::Document | Array (21231.0)

引数から RDoc::Text#normalize_comment でスペースや改行文字などを削 除した後に解析を行います。

...引数から RDoc::Text#normalize_comment でスペースや改行文字などを削
除した後に解析を行います。

@param text 文字列を指定します。

@see RDoc::Text#normalize_comment...

REXML::Parsers::PullEvent#text? -> bool (9102.0)

テキストノードなら真を返します。

テキストノードなら真を返します。

REXML::ParseException#context -> [Integer, Integer, Integer] (9101.0)

パースエラーが起きた(XML上の)場所を返します。

...を返します。

要素3個の配列で、
[position, lineno, line]
という形で返します。
position, line は
REXML::ParseException#position
REXML::ParseException#line
と同じ値です。
lineno は IO#lineno が返す意味での行数です。
通常は line と同じ値です。...

URI::MailTo#to_mailtext -> String (6108.0)

URI オブジェクトからメールテキスト文字列を生成します。

...トからメールテキスト文字列を生成します。

例:
require 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext

=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr>
To:...

URI::MailTo#to_rfc822text -> String (6108.0)

URI オブジェクトからメールテキスト文字列を生成します。

...トからメールテキスト文字列を生成します。

例:
require 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext

=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr>
To:...

絞り込み条件を変える

Net::HTTPHeader#main_type -> String|nil (45.0)

"text/html" における "text" のようなタイプを表す 文字列を返します。

..."text/html" における "text" のようなタイプを表す
文字列を返します。

Content-Type: ヘッダフィールドが存在しない場合には nil を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_r...
...esponse(uri)
res.main_type # => "text"
//}...

Net::HTTPHeader#content_type -> String|nil (23.0)

"text/html" のような Content-Type を表す 文字列を返します。

..."text/html" のような Content-Type を表す
文字列を返します。

Content-Type: ヘッダフィールドが存在しない場合には nil を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
req = Net::HTTP::Post...

Net::HTTPHeader#sub_type -> String|nil (23.0)

"text/html" における "html" のようなサブタイプを表す 文字列を返します。

..."text/html" における "html" のようなサブタイプを表す
文字列を返します。

Content-Type: ヘッダフィールドが存在しない場合には nil を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP...

REXML::StreamListener#entitydecl(content) -> () (19.0)

DTDの実体宣言をパースしたときに呼び出されるコールバックメソッドです。

...mlist[][ruby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
xml = <<EOS
<!DOCTYPE root [
<!ENTITY % YN '"Yes"'>
<!ENTITY % YN 'Yes'>
<!ENTITY WhatHeSaid "He said %YN;">
<!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHat...
...-//Textuality//TEXT Standard open-hatch boilerplate//EN" "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif>
]>
<root />
EOS

class Listener
include REXML::StreamListener
def entitydecl(content); p content; end
end
REXML::Parsers:...
...:StreamParser.new(xml, Listener.new).parse
# >> ["YN", "\"Yes\"", "%"]
# >> ["YN", "Yes", "%"]
# >> ["WhatHeSaid", "He said %YN;"]
# >> ["open-hatch", "SYSTEM", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
# >> ["open-hatch", "PUBLIC", "-//Textuality//TEXT Standard open-hatch boilerplate//...
<< 1 2 > >>