77件ヒット
[1-77件を表示]
(0.071秒)
種類
- インスタンスメソッド (66)
- クラス (11)
ライブラリ
- pathname (33)
-
rdoc
/ code _ object (22) -
rexml
/ document (22)
クラス
- Pathname (33)
-
RDoc
:: CodeObject (22) -
REXML
:: Element (11)
キーワード
- Default (11)
-
document
_ children= (11) -
document
_ self= (11) -
each
_ child (22) -
root
_ node (11)
検索結果
先頭5件
-
Pathname
# children(with _ directory = true) -> [Pathname] (24308.0) -
self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。
...self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。
ただし、 ".", ".." は要素に含まれません。
@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。
@raise Errno::EXXX self が存在しないパ......スであったりディレクトリでなければ例外が発生します。
//emlist[例][ruby]{
require 'pathname'
Pathname.new("/tmp").children # => [#<Pathname:.X11-unix>, #<Pathname:.iroha_unix>, ... ]
//}... -
RDoc
:: CodeObject # document _ children=(val) (12207.0) -
自身に含まれるメソッド、エイリアス、定数や属性をドキュメントに含めるか どうかを設定します。
...トに含めるか
どうかを設定します。
:nodoc:、:stopdoc: を指定した時に false が設定されます。
@param val true を指定した場合、上記をドキュメントに含めます。
@see RDoc::CodeObject#document_self=,
RDoc::CodeObject#remove_classes_and_modules... -
Pathname
# each _ child(with _ directory = true) -> Enumerator (6224.0) -
self.children(with_directory).each と同じです。
...self.children(with_directory).each と同じです。
@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。
//emlist[例][ruby]{
require "pathname"
Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname......:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/usr/local/lib>
# => #<Pathname:/usr/local/opt>
# => #<Pathname:/usr/local/sbin>
# => #<Pathname:/usr/local/share>
# => #<Pathname:/usr/local/var>
Pathname("/usr/local").each_child(false) {|f| p f }
# => #<Pathname:bin>
# => #<Pat......hname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
# => #<Pathname:sbin>
# => #<Pathname:share>
# => #<Pathname:var>
//}
@see Pathname#children... -
Pathname
# each _ child(with _ directory = true) {|pathname| . . . } -> [Pathname] (6224.0) -
self.children(with_directory).each と同じです。
...self.children(with_directory).each と同じです。
@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。
//emlist[例][ruby]{
require "pathname"
Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname......:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/usr/local/lib>
# => #<Pathname:/usr/local/opt>
# => #<Pathname:/usr/local/sbin>
# => #<Pathname:/usr/local/share>
# => #<Pathname:/usr/local/var>
Pathname("/usr/local").each_child(false) {|f| p f }
# => #<Pathname:bin>
# => #<Pat......hname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
# => #<Pathname:sbin>
# => #<Pathname:share>
# => #<Pathname:var>
//}
@see Pathname#children... -
RDoc
:: CodeObject # document _ self=(val) (6118.0) -
自身をドキュメントに含めるかどうかを設定します。
...す。
:doc: を指定した時に true が設定されます。
:nodoc:、:stopdoc: を指定した時に false が設定されます。
@param val true を指定した場合、自身をドキュメントに含めます。
@see RDoc::CodeObject#document_children=,
RDoc::CodeObject#remove_me... -
REXML
:: Formatters :: Default (6060.0) -
XMLドキュメントを(文字列として)出力するクラスです。
...XMLドキュメントを(文字列として)出力するクラスです。
REXML::Formatters::Pretty と
異なりテキストの改行や空白を修正せずにそのまま出力します。
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/default'
doc = REXML::Document.new <......children>
<grandchildren/>
</children>
</root>
EOS
default_formatter = REXML::Formatters::Default.new
output = StringIO.new
default_formatter.write(doc, output)
output.string
# => "<root>\n<children>\n <grandchildren/>\n</children>\n</root>\n"
output = StringIO.new
default_formatter.write(REXML......t(doc, "/root/children"), output)
output.string
# => "<children>\n <grandchildren/>\n</children>"
ie_hack_formatter = REXML::Formatters::Default.new(true)
output = StringIO.new
ie_hack_formatter.write(doc, output)
output.string
# => "<root>\n<children>\n <grandchildren />\n</children>\n</root>\n"... -
REXML
:: Element # root _ node -> REXML :: Document | REXML :: Node (3260.0) -
self が属する文書のルートノードを返します。
...self が属する文書のルートノードを返します。
通常はその要素が属する文書(REXML::Document) オブジェクトが
返されます。
その要素が属する REXML::Document オブジェクトが存在しない
場合は木構造上のルートノードが返されま......emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root>
<children>
<grandchildren />
</children>
</root>
EOS
children = doc.get_elements("/root/children").first
children.name # => "children"
children.root_node == doc # => true
grandchildren = doc.get_elements("/root/child......ren/grandchildren").first
grandchildren.name # => "grandchildren"
grandchildren.root_node == doc # => true
//}...