1723件ヒット
[1-100件を表示]
(0.226秒)
別のキーワード
ライブラリ
クラス
- Addrinfo (24)
- Array (76)
- BasicObject (24)
- CSV (12)
-
CSV
:: Row (6) - Class (12)
- Data (6)
- Date (2)
- DateTime (2)
- Dir (12)
- ERB (24)
-
Encoding
:: Converter (24) -
Encoding
:: InvalidByteSequenceError (12) -
Encoding
:: UndefinedConversionError (12) - Enumerator (36)
-
Enumerator
:: Lazy (12) - File (12)
-
File
:: Stat (12) -
Gem
:: Requirement (12) - IO (12)
- Integer (24)
-
JSON
:: State (72) - MatchData (12)
- Matrix (48)
- Method (24)
- Module (24)
-
Net
:: HTTP (108) - Object (120)
- OptionParser (72)
-
Rake
:: Application (12) - Regexp (60)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (72) - Set (20)
- SignalException (12)
- String (120)
- StringIO (12)
- StringScanner (60)
- Struct (24)
- Thread (40)
-
Thread
:: Backtrace :: Location (48) -
Thread
:: ConditionVariable (24) -
Thread
:: Queue (36) -
Thread
:: SizedQueue (36) - ThreadGroup (12)
- Time (2)
- TracePoint (14)
- UnboundMethod (12)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ METHOD (12) -
WIN32OLE
_ TYPE (24) -
WIN32OLE
_ TYPELIB (12) -
Zlib
:: GzipWriter (24)
モジュール
- Enumerable (72)
-
JSON
:: Generator :: GeneratorMethods :: String (12) -
Net
:: HTTPHeader (72) -
Rake
:: TaskManager (12)
キーワード
- != (12)
- === (24)
- =~ (12)
- [] (12)
-
absolute
_ path (24) - add (12)
-
alias
_ method (12) -
base
_ label (24) -
bind
_ call (12) - broadcast (12)
- chardev? (12)
- close (12)
- concat (12)
-
connect
_ from (24) - convert (12)
- cycle (36)
- deconstruct (6)
-
deconstruct
_ keys (12) -
default
_ event _ sources (12) - deq (24)
- disasm (12)
- disassemble (12)
- dump (12)
- each (84)
-
each
_ capitalized _ name (12) -
each
_ header (12) -
each
_ key (12) -
each
_ name (12) -
each
_ value (12) -
each
_ with _ index (24) -
enum
_ for (24) -
error
_ bytes (12) -
error
_ char (12) -
eval
_ script (7) - fetch (36)
- finish (12)
- flock (12)
- get2 (24)
- gsub (48)
- handler= (12)
- help (12)
- helpfile (12)
-
ignore
_ deadlock= (4) -
in
_ namespace (12) - inherited (12)
- initialize (12)
-
insert
_ output (12) - inspect (55)
-
instruction
_ sequence (7) - invkind (12)
- label (12)
- match (24)
-
max
_ by (48) -
method
_ removed (12) - next (12)
-
object
_ nl (12) -
object
_ nl= (12) -
on
_ head (12) -
on
_ tail (12) - owner (12)
- path (24)
- peek (12)
- peep (12)
- pid (12)
- pointer= (12)
- pop (24)
- pos= (12)
- post2 (24)
-
public
_ send (24) - read (12)
-
request
_ get (24) -
request
_ post (24) -
respond
_ to? (12) - result (12)
- run (12)
-
send
_ request (12) - separator (12)
- shift (24)
- signal (12)
- signm (12)
-
singleton
_ method _ removed (12) -
source
_ location (12) - space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - src (12)
- sub (36)
- times (24)
-
to
_ csv (4) -
to
_ enum (24) -
to
_ json (12) -
to
_ s (44) -
top
_ level (12) - unscan (12)
- upto (12)
- ver (12)
- wakeup (12)
-
with
_ index (12) -
with
_ object (24) - ~ (12)
検索結果
先頭5件
-
StringIO
# puts(*obj) -> nil (27242.0) -
obj と改行を順番に自身に出力します。引数がなければ改行のみを出力します。 詳しい仕様は Kernel.#puts を参照して下さい。
...Kernel.#puts を参照して下さい。
@param obj 書き込みたいオブジェクトを指定します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("", 'r+')
a.puts("hoge", "bar",......"foo")
a.string #=> "hoge\nbar\nfoo\n"
//}... -
CSV
# puts(row) -> self (18332.0) -
自身に row を追加します。
...自身に row を追加します。
データソースは書き込み用にオープンされていなければなりません。
@param row 配列か CSV::Row のインスタンスを指定します。
CSV::Row のインスタンスが指定された場合は、CSV::Row#fields の値......ist[例 配列を指定][ruby]{
require "csv"
File.write("test.csv", <<CSV)
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
CSV.open("test.csv", "a") do |csv|
csv.puts(["5", "saburo", "kondo", "34"])
end
print File.read("test.csv")
# => id,first n......ame,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,adachi,21
# 5,saburo,kondo,34
//}
//emlist[例 CSV::Row を指定][ruby]{
require "csv"
File.write("test.csv", <<CSV)
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,a... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (18237.0) -
自身から生成した JSON 形式の文字列を返します。
...ドは UTF-8 であるべきです。
"\u????" のように UTF-16 ビッグエンディアンでエンコードされた文字列を返すことがあります。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のイ......JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
puts "test".to_json # => "test"
puts '"'.to_json # => "\""
puts "\\".to_json # => "\\"
puts "𤘩宮城".to_json(a......scii_only: true) # => "\ud851\ude29\u5bae\u57ce"
//}... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (18225.0) -
エラー発生時に捨てられたバイト列を返します。
...mlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1\xFFdef")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
puts $!.error_bytes.dump #=> "\xA1"
puts $!.reada......gain_bytes.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (18219.0) -
self のデバッグ用の情報を含んだ文字列を返します。
...self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//}... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (18207.0) -
self が表す命令シーケンスの絶対パスを返します。
...irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, wor......ld"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # path -> String (18207.0) -
self が表す命令シーケンスの相対パスを返します。
...irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, wor......ld"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"
@see RubyVM::InstructionSequence#absolute_path... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (15719.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval......("puts 'hello'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (15379.0) -
型が持つソースインターフェイスを取得します。
...す。
default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。
@return デフォ......TYPEの配列と
して返します。返すのは配列ですが、デフォルトのソースインターフェ
イスは最大でも1インターフェイスです。ソースインターフェイスを持
たない場合は空配列を返します。
tobj = WIN32OLE_T......YPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]
WIN32OLE_EVENT.newでインターフェイス名を指定しない場合は、ここで
返されたインターフェイスが選択されます。
次のサンプル... -
Encoding
:: Converter # convert(source _ string) -> String (15267.0) -
与えられた文字列を変換して、変換できた結果を返します。 引数の末尾の文字がバイト列の途中で終わっている場合、そのバイト列は変換器内に取り置かれます。 変換を終了させるには Encoding::Converter#finish を呼びます。
...verter#finish を呼びます。
Encoding::Converter を用いると、文字列の一部または全部を渡して変換を行うことができます。よって、不正なバイトを意識せずにストリームから読み出した文字列を変換したいときには Encoding::Converter......rter#convert では、これらの例外を捕獲しても、例外を起こしたところから変換を再開することはできません。不正なバイトや変換先で未定義な文字をエスケープしたい場合やさらに細かい指定を行いたい場合は、Encoding::Convert......er#primitive_convert を用います。
@param source_string 変換する文字列の一部または全部です。
@return 変換結果である文字列の一部または全部です。
@raise Encoding::InvalidByteSequenceError 変換元のエンコーディングにおいて不正なバイト列...