るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. kernel p
  5. rsa p

ライブラリ

モジュール

キーワード

検索結果

Net::HTTPResponse#entity -> String | () | nil (18114.0)

エンティティボディを返します。

...Net::HTTPResponse#read_body をブロック付きで呼んだ場合には
このメソッドはNet::ReadAdapter のインスタンスを返しますが、
これは使わないでください。

entity
は obsolete です。

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

uri = "http://www.example.com/i...
...ndex.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.body[0..10] # => "<!doctype h"
//}...

REXML::Parsers::PullEvent#entitydecl? -> bool (12101.0)

DTDの実体宣言なら真を返します。

DTDの実体宣言なら真を返します。

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

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

...@param content 実体宣言が配列で渡されます

実体宣言の書き方によって content に渡されるデータの形式が異なります。

//emlist[][ruby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
xml = <<EOS
<!DOCTYPE...
...ot [
<!ENTITY % YN '"Yes"'>
<!ENTITY % YN 'Yes'>
<!ENTITY WhatHeSaid "He said %YN;">
<!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY open-hatch PUBLIC "-//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", "%"]
# >> ["Wha...

Net::HTTPResponse#body -> String | () | nil (3014.0)

エンティティボディを返します。

...Net::HTTPResponse#read_body をブロック付きで呼んだ場合には
このメソッドはNet::ReadAdapter のインスタンスを返しますが、
これは使わないでください。

entity
は obsolete です。

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

uri = "http://www.example.com/i...
...ndex.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.body[0..10] # => "<!doctype h"
//}...