1700件ヒット
[1-100件を表示]
(0.197秒)
別のキーワード
ライブラリ
- ビルトイン (12)
- csv (120)
- erb (60)
- etc (12)
-
irb
/ cmd / load (12) - json (156)
-
json
/ add / struct (12) - logger (216)
-
net
/ http (60) - optparse (192)
- ostruct (14)
- pathname (450)
- rake (12)
-
rake
/ packagetask (36) - resolv (12)
-
rexml
/ document (288) - rubygems (12)
- socket (12)
- win32ole (12)
クラス
- Addrinfo (12)
- CSV (96)
-
CSV
:: Table (24) - ERB (60)
- IO (12)
-
IRB
:: ExtendCommand :: Require (12) -
JSON
:: Parser (24) -
JSON
:: State (72) - Logger (216)
- Module (12)
- OpenStruct (14)
- OptionParser (192)
- Pathname (450)
-
REXML
:: Attribute (24) -
REXML
:: Attributes (96) -
REXML
:: DocType (24) -
REXML
:: Element (132) -
REXML
:: Elements (12) -
Rake
:: DefaultLoader (12) -
Rake
:: PackageTask (36) -
Resolv
:: DNS :: Name (12) - Struct (12)
-
WIN32OLE
_ TYPE (12)
モジュール
キーワード
- + (12)
-
/ (11) - <=> (12)
- == (12)
- === (12)
- JSON (12)
- [] (24)
- []= (12)
- add (24)
-
add
_ attributes (12) -
add
_ namespace (24) - ascend (12)
- attribute (12)
-
attributes
_ of (12) - autoload (12)
- binread (12)
- canonname (12)
- children (12)
- chown (12)
- cleanpath (12)
-
col
_ sep (12) - convert (36)
-
def
_ class (12) -
def
_ method (12) -
def
_ module (12) -
default
_ event _ sources (12) - delete (12)
-
delete
_ all (12) -
delete
_ if (12) -
delete
_ namespace (12) - descend (12)
- dirname (12)
- each (36)
-
each
_ attribute (12) -
each
_ capitalized _ name (12) -
each
_ child (24) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) -
each
_ entry (15) -
each
_ header (12) -
each
_ key (12) -
each
_ line (24) -
each
_ name (12) - entries (12)
- eql? (12)
- error (24)
- execute (12)
-
external
_ id (12) - fatal (24)
- filename (12)
- filename= (12)
- fnmatch (12)
- formatter (12)
- formatter= (12)
- gem (12)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) - glob (16)
-
header
_ convert (36) - info (24)
- j (12)
- jj (12)
- join (12)
- load (24)
- log (24)
- name= (12)
- namespace (24)
- namespaces (24)
-
object
_ nl (12) -
object
_ nl= (12) - on (144)
-
package
_ dir= (12) - parent (12)
- parse (12)
- pathconf (12)
- progname (12)
- progname= (12)
-
program
_ name (12) -
program
_ name= (12) - puts (12)
- realdirpath (12)
- realpath (24)
- relative? (12)
-
relative
_ path _ from (12) - root (12)
- root? (12)
-
root
_ node (12) - source (12)
- space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - split (12)
- sub (24)
-
sub
_ ext (12) -
subdomain
_ of? (12) -
to
_ h (14) -
to
_ json (36) -
to
_ s (12) -
to
_ string (12) - unknown (24)
- unlink (12)
- ver (12)
- warn (24)
検索結果
先頭5件
-
Rake
:: PackageTask # name -> String (24320.0) -
バージョン情報を含まないパッケージの名前を返します。
...バージョン情報を含まないパッケージの名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.name # => "sample"
end
//}... -
Pathname
# realpath -> Pathname (18419.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...Pathname オブジェクトを返します。
また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。
self が指すパスが存在しない場合は例外 Errno::ENOENT が発生します。
@param b......dir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.......mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")
p path.realpath
# => ruby 1.8.0 (2003-10-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}
@see Pathname#realdirpath, File.realpath... -
Pathname
# realpath(basedir = nil) -> Pathname (18419.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...Pathname オブジェクトを返します。
また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。
self が指すパスが存在しない場合は例外 Errno::ENOENT が発生します。
@param b......dir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.......mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")
p path.realpath
# => ruby 1.8.0 (2003-10-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}
@see Pathname#realdirpath, File.realpath... -
Pathname
# dirname -> Pathname (18413.0) -
Pathname.new(File.dirname(self.to_s)) と同じです。
...Pathname.new(File.dirname(self.to_s)) と同じです。
//emlist[例][ruby]{
require "pathname"
Pathname('/usr/bin/shutdown').dirname # => #<Pathname:/usr/bin>
//}
@see File.dirname... -
Pathname
# realdirpath(basedir = nil) -> Pathname (18413.0) -
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。
...athname#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require "pathname......path = Pathname("/not_exist")
path.realdirpath # => #<Pathname:/not_exist>
path.realpath # => Errno::ENOENT
# 最後ではないコンポーネント(/not_exist_1)も存在しないのでエラーになる。
path = Pathname("/not_exist_1/not_exist_2")
path.realdirpath # => Errno::ENOENT
//......}
@see Pathname#realpath... -
Pathname
# relative _ path _ from(base _ directory) -> Pathname (18413.0) -
base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。
...se_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。
パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。
self が相対パスなら base_directory......絶対パスなら
base_directory も絶対パスでなければなりません。
@param base_directory ベースディレクトリを表す Pathname オブジェクトを指定します。
@raise ArgumentError Windows上でドライブが違うなど、base_directory から self への相対パ......スが求められないときに例外が発生します。
//emlist[例][ruby]{
require 'pathname'
path = Pathname.new("/tmp/foo")
base = Pathname.new("/tmp")
path.relative_path_from(base) # => #<Pathname:foo>
//}... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (18237.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生......State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, age)
@name, @age = name, age
end
end
tanaka = Person.new("ta......naka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::GeneratorMethods::Object
//}... -
JSON
:: Generator :: GeneratorMethods :: Hash # to _ json(state _ or _ hash = nil) -> String (18225.0) -
自身から生成した JSON 形式の文字列を返します。
...aram state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
per......son = { "name" => "tanaka", "age" => 19 }
person.to_json # => "{\"name\":\"tanaka\",\"age\":19}"
//}... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (15542.0) -
namespace と name で特定される属性を返します。
...namespace と name で特定される属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合......@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a =......et_elements("/root/a").first
a.attributes.get_attribute_ns("", "att") # => att='<'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt...