1211件ヒット
[1-100件を表示]
(0.192秒)
別のキーワード
ライブラリ
クラス
- Array (60)
- BasicObject (60)
- CSV (12)
-
CSV
:: Row (6) - Class (12)
- Data (6)
- Date (2)
- DateTime (2)
- Dir (12)
-
Encoding
:: InvalidByteSequenceError (12) -
Encoding
:: UndefinedConversionError (12) - Enumerator (36)
-
File
:: Stat (60) - IO (12)
- Matrix (24)
- Method (24)
- Module (63)
-
Net
:: HTTP (108) - Object (132)
- OptionParser (72)
-
Rake
:: Application (12) - Regexp (60)
-
RubyVM
:: InstructionSequence (48) - SignalException (12)
- String (12)
- StringScanner (60)
- Thread (12)
-
Thread
:: Backtrace :: Location (48) -
Thread
:: ConditionVariable (24) -
Thread
:: Queue (36) -
Thread
:: SizedQueue (36) - Time (2)
- TracePoint (14)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12) -
Zlib
:: GzipWriter (24)
モジュール
- Enumerable (48)
-
Rake
:: TaskManager (12)
キーワード
- ! (12)
- != (12)
- === (24)
- =~ (12)
- [] (12)
-
absolute
_ path (24) -
alias
_ method (12) -
base
_ label (24) - blockdev? (12)
- broadcast (12)
- chardev? (12)
- close (12)
-
const
_ added (3) - deconstruct (6)
-
deconstruct
_ keys (12) -
default
_ event _ sources (12) - deq (24)
- each (24)
-
each
_ with _ index (24) -
enum
_ for (24) -
error
_ bytes (12) -
error
_ char (12) -
eval
_ script (7) - fetch (36)
- finish (12)
- get2 (24)
- handler= (12)
- help (12)
-
in
_ namespace (12) - inherited (12)
- initialize (12)
-
initialize
_ copy (12) - inspect (12)
-
instruction
_ sequence (7) - label (12)
- match (24)
-
max
_ by (48) -
method
_ added (12) -
method
_ removed (12) -
method
_ undefined (12) - next (12)
-
on
_ head (12) -
on
_ tail (12) - owner (12)
- path (12)
- 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) -
send
_ request (12) - separator (12)
- setgid? (12)
- setuid? (12)
- shift (24)
- signal (12)
- signm (12)
-
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
source
_ location (12) - sticky? (12)
-
to
_ enum (24) -
to
_ s (36) -
top
_ level (12) -
undef
_ method (12) - unscan (12)
- upto (12)
- ver (12)
-
with
_ object (24) - ~ (12)
検索結果
先頭5件
-
CSV
# puts(row) -> self (18232.0) -
自身に row を追加します。
...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......21
CSV
CSV.open("test.csv", "a") do |csv|
row = CSV::Row.new(["id", "first name", "last name", "age"], ["5", "saburo", "kondo", "34"])
csv.add_row(row)
end
print File.read("test.csv")
# => "id", first name,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,... -
Net
:: HTTP # send _ request(name , path , data = nil , header = nil) -> Net :: HTTPResponse (12213.0) -
HTTP リクエストをサーバに送り、そのレスポンスを Net::HTTPResponse のインスタンスとして返します。
...HTTP リクエストをサーバに送り、そのレスポンスを
Net::HTTPResponse のインスタンスとして返します。
@param name リクエストのメソッド名を文字列で与えます。
@param path リクエストのパスを文字列で与えます。
@param data リクエ......ストのボディを文字列で与えます。
@param header リクエストのヘッダをハッシュで与えます。
//emlist[例][ruby]{
response = http.send_request('GET', '/index.html')
puts response.body
//}
@see Net::HTTP#request... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (9325.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...t_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] (9285.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でインターフェイス名を指定しない場合は、ここで
返されたインターフェイスが選択されます。
次のサンプル... -
Object
# public _ send(name , *args) -> object (9219.0) -
オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。
...//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
@raise ArgumentError name を指定しなかった場合に発生します。
@raise NoMethodError protected メ......ソッドや private メソッドに対して実行
した場合に発生します。
//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}
@see BasicObject#__send__, Object#send... -
Object
# public _ send(name , *args) { . . . . } -> object (9219.0) -
オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。
...//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
@raise ArgumentError name を指定しなかった場合に発生します。
@raise NoMethodError protected メ......ソッドや private メソッドに対して実行
した場合に発生します。
//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}
@see BasicObject#__send__, Object#send... -
Thread
:: Backtrace :: Location # absolute _ path -> String (9131.0) -
self が表すフレームの絶対パスを返します。
...list[例][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.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see Thread::Backtrace::Location......#path... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (9125.0) -
エラー発生時に捨てられたバイト列を返します。
...//emlist[例][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 $!.re......adagain_bytes.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (9113.0) -
self が表す命令シーケンスの絶対パスを返します。
...= 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, world"
end
# irb
> iseq = Ruby......VM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path...