330件ヒット
[1-100件を表示]
(0.140秒)
ライブラリ
- date (12)
-
fiddle
/ import (12) -
irb
/ cmd / load (12) -
irb
/ ext / use-loader (48) - json (12)
- mkmf (24)
- openssl (36)
- pathname (12)
- rake (24)
-
rdoc
/ context (24) -
rexml
/ document (84) - thwait (6)
- uri (24)
クラス
- Date (12)
-
IRB
:: Context (36) -
IRB
:: ExtendCommand :: Require (12) -
OpenSSL
:: SSL :: SSLContext (12) -
OpenSSL
:: X509 :: ExtensionFactory (12) -
OpenSSL
:: X509 :: StoreContext (12) - Pathname (12)
-
RDoc
:: Context (24) -
REXML
:: Child (12) -
REXML
:: Element (48) -
REXML
:: Text (24) -
Rake
:: Application (12) - String (12)
- ThreadsWait (6)
-
URI
:: MailTo (24)
モジュール
-
Fiddle
:: Importer (12) -
IRB
:: ExtendCommandBundle (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (24)
キーワード
-
add
_ loader (12) -
add
_ require (12) -
add
_ to (12) -
client
_ cert _ cb= (12) - config= (12)
-
create
_ header (12) -
create
_ makefile (12) -
each
_ element _ with _ text (12) - error= (12)
- execute (12)
- extern (12)
-
get
_ text (12) -
irb
_ require (12) -
next
_ sibling= (12) -
next
_ wait (6) -
next
_ year (12) -
sub
_ ext (12) - text (12)
- text= (12)
-
to
_ json (12) -
to
_ mailtext (12) -
to
_ rfc822text (12) -
to
_ s (12) -
use
_ loader (12) -
use
_ loader= (12) -
use
_ loader? (12) - value (12)
検索結果
先頭5件
-
String
# ext(newext = & # 39;& # 39;) -> String (24332.0) -
自身の拡張子を与えられた拡張子で置き換えます。
...た拡張子が空文字列の場合は、自身の拡張子を削除します。
@param newext 新しい拡張子を指定します。
例:
require "rake"
"hoge".ext(".rb") # => "hoge.rb"
"hoge.rb".ext(".erb") # => "hoge.erb"
"hoge.tar.gz".ext(".bz2") # => "hoge.tar.bz2"... -
Fiddle
:: Importer # extern(signature , *opts) -> Fiddle :: Function (15225.0) -
Fiddle::Importer#dlload で取り込んだライブラリから C の関数をインポートします。
...e::Importer#dlload で取り込んだライブラリから
C の関数をインポートします。
インポートした関数はそのモジュールにモジュール関数として定義されます。
signature で関数の名前とシネグチャを指定します。例えば
"int strcmp(ch......す。
opts には :stdcall もしくは :cdecl を渡すことができ、
呼出規約を明示することができます。
@return インポートした関数を表す Fiddle::Function オブジェクトを返します。
@param signature 関数の名前とシネグチャ
@param opts オプ......ション
例
require 'fiddle/import'
module M
extern Fiddle::Importer
dlload "libc.so.6"
extern "int strcmp(char*, char*)"
end
M.strcmp("abc", "abc") # => 0
M.strcmp("abc", "abd") # => -1... -
URI
:: MailTo # to _ mailtext -> String (15225.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: ruby-list@ruby-lang.org
Subject: subscribe... -
URI
:: MailTo # to _ rfc822text -> String (15225.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: ruby-list@ruby-lang.org
Subject: subscribe... -
IRB
:: ExtendCommand :: Require # execute(file _ name) -> bool (15125.0) -
ファイル file_name を現在の irb インタプリタ上で実行します。
...me に Ruby スクリプトを指定した場合は、Kernel.#require と異
なり、file_name の内容を irb で一行ずつタイプしたかのように、irb 上で一
行ずつ評価されます。require に成功した場合は true を、そうでない場合は
false を返します。......拡張ライブラリ(*.so,*.o,*.dll など)を指定した場合は単純に require され
ます。
@param file_name ファイル名を文字列で指定します。... -
REXML
:: Element # text=(text) (12413.0) -
「先頭の」テキストノードを text で置き換えます。
... text で置き換えます。
テキストノードを1つ以上保持している場合はそのうち
最初のノードを置き換えます。
要素がテキストノードを保持していない場合は新たなテキストノードが追加されます。
text には文字列、REXML::T......ext、nil のいずれかが指定できます。
REXML::Text オブジェクトを指定した場合には、それが設定され、
文字列を指定した場合には
REXML::Text.new(text, whitespace(), nil, raw())
で生成される Text オブジェクトが設定されます。
nil を指定......ます。
@param text 置き換え後のテキスト(文字列、REXML::Text, nil(削除))
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><b/></a>')
doc.to_s # => "<a><b/></a>"
doc.root.text = "Foo"; doc.to_s # => "<a><b/>Foo</a>"
doc.root.text = "Bar"; doc.to_s # => "<a>... -
REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () (12325.0) -
テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。
...クを呼び出します。
text を指定すると、テキストの内容が text であるもののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
name を指定すると、それは xpath 文字列と見なされ、......ん)。
@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
doc.root.each_element_with_text {|e|p e......}
# >> <b> ... </>
# >> <c> ... </>
# >> <d> ... </>
doc.root.each_element_with_text('b'){|e|p e}
# >> <b> ... </>
# >> <c> ... </>
doc.root.each_element_with_text('b', 1){|e|p e}
# >> <b> ... </>
doc.root.each_element_with_text(nil, 0, 'd'){|e|p e}
# >> <d> ... </>
//}... -
REXML
:: Element # get _ text(path = nil) -> REXML :: Text | nil (12319.0) -
先頭のテキスト子ノードを返します。
...L::Text#value も参照してください。
path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字列を返します。
テキストノードがない場合には nil を返します。
@param path XPath文字列
@see REXML::Element#text
//emlist[][......ruby]{
require 'rexml/document'
doc = REXML::Document.new "<p>some text <b>this is bold!</b> more text</p>"
# doc.root (<p> ... </p>) は2つのテキストノード("some text " と " more text"
# を持っているが、前者を返す
doc.root.get_text.value # => "some text "
//}... -
Pathname
# sub _ ext(replace) -> Pathname (12250.0) -
拡張子を与えられた文字列で置き換えた Pathname オブジェクトを返します。
...Pathname オブジェクトを返します。
自身が拡張子を持たない場合は、与えられた文字列を拡張子として付加します。
@param replace 拡張子を文字列で指定します。
//emlist[例][ruby]{
require "pathname"
Pathname('/usr/bin/shutdown').sub_ext('.rb......<Pathname:/usr/bin/shutdown.rb>
Pathname('/home/user/test.txt').sub_ext('.pdf') # => #<Pathname:/home/user/test.pdf>
Pathname('/home/user/test').sub_ext('.pdf') # => #<Pathname:/home/user/test.pdf>
Pathname('/home/user/test.').sub_ext('.pdf') # => #<Pathname:/home/user/test..pdf>
Pathna......me('/home/user/.test').sub_ext('.pdf') # => #<Pathname:/home/user/.test.pdf>
Pathname('/home/user/test.tar.gz').sub_ext('.xz') # => #<Pathname:/home/user/test.tar.xz>
//}...