365件ヒット
[1-100件を表示]
(0.214秒)
ライブラリ
クラス
- ERB (11)
- Object (11)
- OptionParser (22)
- Range (11)
- Set (14)
-
Shell
:: Filter (12) -
Thread
:: Backtrace :: Location (22) -
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ METHOD (22) -
WIN32OLE
_ PARAM (22) -
WIN32OLE
_ TYPE (11) -
WIN32OLE
_ TYPELIB (22) -
WIN32OLE
_ VARIABLE (22) -
Zlib
:: GzipWriter (22)
キーワード
- << (11)
- Location (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - bigdecimal (11)
-
bigdecimal
/ math (11) - handler= (11)
- help (11)
- inspect (29)
- measure (11)
- name (44)
- new (11)
- print (11)
- rss (11)
-
ruby 1
. 6 feature (11) - src (11)
- tracer (11)
- warn (11)
- write (11)
- | (6)
検索結果
先頭5件
-
Kernel
. # puts(*arg) -> nil (18149.0) -
引数と改行を順番に 標準出力 $stdout に出力します。 引数がなければ改行のみを出力します。
...は、
当該オブジェクトを最初に to_ary により配列へ、
次に to_s メソッドにより文字列へ変換を試みます。
末尾が改行で終っている引数や配列の要素に対しては puts 自身
は改行を出力しません。
@param arg 出力するオブジェ......に失敗した場合に発生します。
//emlist[例][ruby]{
puts "foo", "bar\n", "baz"
puts "" # 改行のみ出力
puts # 改行のみ出力
puts nil # 改行のみ出力
puts ["oui", "non"]
#=> foo
# bar
# baz
#
#
#
# oui
# non
//}
@see Kernel.#print, Kernel.#p, IO#puts... -
Object
# to _ s -> String (18119.0) -
オブジェクトの文字列表現を返します。
...使って文字列に変換し
ます。
//emlist[][ruby]{
class Foo
def initialize num
@num = num
end
end
it = Foo.new(40)
puts it #=> #<Foo:0x2b69110>
class Foo
def to_s
"Class:Foo Number:#{@num}"
end
end
puts it #=> Class:Foo Number:40
//}
@see Object#to_str,Kernel.#String... -
Shell
:: Filter # to _ s -> String (18113.0) -
実行結果を文字列で返します。
...実行結果を文字列で返します。
require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
puts (cat("/etc/passwd") | wc("-l")).to_s
}... -
Thread
:: Backtrace :: Location # to _ s -> String (18113.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
...mlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to_s
end
# => path/to/foo.rb:5:in `initialize'
# path/to/foo.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
//}... -
OptionParser
# to _ s -> String (15107.0) -
サマリの文字列を返します。
...se"
options = {}
opts = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
options[:verbose] = v
end
end
puts opts.help
# => Usage: example.rb [options]
# -v, --[no-]verbose Run verbosely
//}... -
Set
# to _ s -> String (15107.0) -
人間の読みやすい形に表現した文字列を返します。
...人間の読みやすい形に表現した文字列を返します。
//emlist[][ruby]{
require 'set'
puts Set.new(['element1', 'element2']).inspect
# => #<Set: {"element1", "element2"}>
//}... -
WIN32OLE
_ METHOD # to _ s -> String (15107.0) -
メソッド名を取得します。
...メソッド名を取得します。
@return メソッド名を文字列で返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbook')
method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
puts method.name # => SaveAs... -
WIN32OLE
_ PARAM # to _ s -> String (15107.0) -
パラメータ名を取得します。
...ータ名を返します。名前付き引数形式でメソッドを呼び出すときに指定します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
param1 = method.params[0]
puts param1.name # => Filename... -
WIN32OLE
_ TYPELIB # to _ s -> String (15107.0) -
TypeLibのドキュメント文字列を取得します。
...どに利用可能なTypeLibの簡単な
説明文で、通常バージョン番号を含みます。
@return TypeLibのドキュメント文字列を返します。
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.name # => 'Microsoft Excel 14.0 Object Library'... -
WIN32OLE
_ VARIABLE # to _ s -> String (15107.0) -
変数名を取得します。
...変数名を取得します。
@return 変数名を文字列で返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.name}" # => xlChart, xlDialogSheet, ...
end...