るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

RubyVM::AbstractSyntaxTree::Node#type -> Symbol (24114.0)

self の種類を Symbol で返します。

...self の種類を Symbol で返します。

//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.type # => :SCOPE
//}...

Net::HTTPHeader#type_params -> Hash (12236.0)

Content-Type のパラメータを {"charset" => "iso-2022-jp"} という形の Hash で返します。

...-Type のパラメータを {"charset" => "iso-2022-jp"}
という形の Hash で返します。

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

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
...
...es = Net::HTTP.get_response(uri)
r
es.type_params # => {"charset"=>"UTF-8"}
//}...

Net::HTTPHeader#set_content_type(type, params = {}) (9367.0)

type と params から Content-Type: ヘッダフィールドの 値を設定します。

...type と params から Content-Type: ヘッダフィールドの
値を設定します。

@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www....
...example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq.content_type # => nil
r
eq.content_type = 'multipart/form-data' # => "multipart/form-data"
r
eq.content_type # => "multipart/form-data"
//}...

REXML::DocType#attribute_of(element, attribute) -> String | nil (9307.0)

DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。

...ト宣言で、 element という名前の要素の attribute という
名前の属性のデフォルト値を返します。

elementという名前の要素の属性値は宣言されていない、
elementという名前の要素にはattributeという名前の属性が宣言されていない...
...す。

@param element 要素名(文字列)
@param attribute 属性名(文字列)

//emlist[][ruby]{
r
equire 'rexml/document'

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #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") # => nil
//}...

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (9292.0)

型が持つソースインターフェイスを取得します。

...default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。

@return デフォルト...
...のソースインターフェイスをWIN32OLE_TYPEの配列と
して返します。返すのは配列ですが、デフォルトのソースインターフェ
イスは最大でも1インターフェイスです。ソースインターフェイスを持
たない場合は...
...空配列を返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]

WIN32OLE_EVENT.newでインターフェイス名を指定しない場合は、ここで
返されたインターフェ...

絞り込み条件を変える

OpenURI::Meta#content_type -> String (9268.0)

対象となるリソースの Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。 Content-Type ヘッダがない場合は、"application/octet-stream" を返します。

...の Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。
Content-Type ヘッダがない場合は、"application/octet-stream" を返します。

//emlist[例][ruby]{
r
equire 'open-uri'
open('http://www.ruby-lang.org/') {|f|
p f.content_type #=> "text/h...
...Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。
Content-Type ヘッダがない場合は、"application/octet-stream" を返します。

//emlist[例][ruby]{
r
equire 'open-uri'
URI.open('http://www.ruby-lang.org/') {|f|
p f.content_type #=> "text/...

Net::HTTPHeader#content_type=(type) (9267.0)

type と params から Content-Type: ヘッダフィールドの 値を設定します。

...type と params から Content-Type: ヘッダフィールドの
値を設定します。

@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www....
...example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq.content_type # => nil
r
eq.content_type = 'multipart/form-data' # => "multipart/form-data"
r
eq.content_type # => "multipart/form-data"
//}...

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

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

...tent-Type を表す
文字列を返します。

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

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
r
eq = Net::HTTP::Post.new(uri.request_uri)
r
eq.co...
...ntent_type # => nil
r
eq.content_type = 'multipart/form-data'
r
eq.content_type # => "multipart/form-data"
//}...

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

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

...タイプを表す
文字列を返します。

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

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
es = Net::HTTP.get_response(uri)
r
es.main_type # => "text"
//}...
<< 1 2 3 ... > >>