別のキーワード
ライブラリ
- ビルトイン (1297)
- abbrev (1)
- bigdecimal (14)
-
bigdecimal
/ util (2) -
cgi
/ core (1) - csv (59)
- date (3)
- digest (6)
- drb (1)
- erb (8)
- etc (1)
- fiddle (2)
-
fiddle
/ import (3) -
io
/ wait (1) -
irb
/ cmd / help (1) -
irb
/ cmd / load (3) -
irb
/ context (3) - json (24)
-
json
/ add / bigdecimal (1) -
json
/ add / complex (1) -
json
/ add / date (1) -
json
/ add / date _ time (1) -
json
/ add / exception (1) -
json
/ add / range (1) -
json
/ add / rational (1) -
json
/ add / regexp (1) -
json
/ add / struct (1) -
json
/ add / time (1) - kconv (1)
- logger (26)
- matrix (90)
- mkmf (5)
- monitor (6)
-
net
/ http (70) - open-uri (8)
- openssl (18)
- optparse (54)
- ostruct (2)
- pathname (38)
- pp (3)
- prime (13)
- psych (8)
- rake (45)
-
rake
/ packagetask (8) -
rake
/ testtask (2) -
rdoc
/ parser / ruby (1) - resolv (1)
-
rexml
/ document (64) -
rexml
/ streamlistener (1) - ripper (3)
-
ripper
/ filter (2) -
ripper
/ lexer (3) - rubygems (1)
-
rubygems
/ custom _ require (1) -
rubygems
/ gem _ path _ searcher (1) -
rubygems
/ installer (2) -
rubygems
/ requirement (11) -
rubygems
/ specification (7) -
rubygems
/ version (4) - set (19)
- socket (9)
- stringio (24)
- strscan (42)
- tsort (8)
- un (5)
- uri (3)
-
webrick
/ httprequest (1) - win32ole (9)
- zlib (2)
クラス
-
ARGF
. class (16) - Addrinfo (5)
- Array (155)
- BasicObject (10)
- BasicSocket (3)
- BigDecimal (15)
- Binding (4)
- CGI (1)
- CSV (22)
-
CSV
:: FieldInfo (3) -
CSV
:: Row (11) -
CSV
:: Table (21) - Class (4)
- Complex (23)
-
DRb
:: DRbUnknown (1) - Date (4)
- DateTime (1)
-
Digest
:: Base (6) - Dir (12)
- ERB (8)
- Encoding (5)
-
Encoding
:: Converter (16) -
Encoding
:: InvalidByteSequenceError (2) -
Encoding
:: UndefinedConversionError (1) - Enumerator (16)
-
Enumerator
:: Lazy (35) -
Enumerator
:: Yielder (3) - Exception (10)
- FalseClass (5)
- Fiber (5)
-
Fiddle
:: Function (1) -
Fiddle
:: Pointer (1) - File (5)
-
File
:: Stat (29) - Float (33)
- FrozenError (1)
-
Gem
:: GemPathSearcher (1) -
Gem
:: Installer (2) -
Gem
:: Requirement (11) -
Gem
:: Specification (7) -
Gem
:: Version (4) - Hash (57)
- IO (34)
-
IRB
:: Context (3) -
IRB
:: ExtendCommand :: Help (1) -
IRB
:: ExtendCommand :: Load (1) -
IRB
:: ExtendCommand :: Require (1) -
IRB
:: ExtendCommand :: Source (1) - Integer (72)
-
JSON
:: Parser (2) -
JSON
:: State (9) - Logger (26)
- MatchData (23)
- Matrix (63)
-
Matrix
:: LUPDecomposition (1) - Method (21)
- Module (54)
- Monitor (5)
-
Net
:: HTTP (18) -
Net
:: HTTPGenericRequest (7) -
Net
:: HTTPResponse (9) - NilClass (10)
- Numeric (37)
- Object (48)
-
OpenSSL
:: BN (17) - OpenStruct (2)
- OptionParser (47)
- PP (1)
- Pathname (38)
- Prime (4)
-
Prime
:: EratosthenesGenerator (3) -
Prime
:: PseudoPrimeGenerator (4) - Proc (7)
-
Psych
:: Nodes :: Node (2) -
Psych
:: ScalarScanner (1) -
Psych
:: Stream (2) -
Psych
:: Visitors :: YAMLTree (1) -
RDoc
:: Parser :: Ruby (1) -
REXML
:: Attribute (3) -
REXML
:: Attributes (12) -
REXML
:: CData (2) -
REXML
:: DocType (9) -
REXML
:: Document (3) -
REXML
:: Element (21) -
REXML
:: Elements (9) -
REXML
:: Entity (1) -
REXML
:: Instruction (2) -
REXML
:: Text (2) -
Rake
:: Application (5) -
Rake
:: FileList (16) -
Rake
:: FileTask (2) -
Rake
:: InvocationChain (3) -
Rake
:: NameSpace (2) -
Rake
:: PackageTask (8) -
Rake
:: TaskArguments (5) -
Rake
:: TestTask (2) - Random (6)
- Range (34)
- Rational (29)
- Refinement (1)
- Regexp (16)
-
Resolv
:: DNS :: Name (1) - Ripper (3)
-
Ripper
:: Filter (2) -
Ripper
:: Lexer (3) -
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (11) - Set (17)
- SignalException (2)
- Socket (1)
- String (182)
- StringIO (24)
- StringScanner (42)
- Struct (26)
- Symbol (7)
- Thread (18)
-
Thread
:: Backtrace :: Location (7) -
Thread
:: ConditionVariable (2) -
Thread
:: Mutex (5) -
Thread
:: Queue (9) -
Thread
:: SizedQueue (5) - ThreadGroup (2)
- Time (38)
- TracePoint (18)
- TrueClass (5)
-
URI
:: MailTo (3) - UnboundMethod (11)
- UncaughtThrowError (3)
- Vector (26)
-
WEBrick
:: HTTPRequest (1) - WIN32OLE (3)
-
WIN32OLE
_ EVENT (1) -
WIN32OLE
_ METHOD (1) -
WIN32OLE
_ TYPE (2) -
WIN32OLE
_ TYPELIB (1) -
WIN32OLE
_ VARIANT (1) -
Zlib
:: GzipWriter (2)
モジュール
- Comparable (8)
- Enumerable (114)
-
Fiddle
:: Importer (3) - GC (1)
-
JSON
:: Generator :: GeneratorMethods :: Array (1) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (1) -
JSON
:: Generator :: GeneratorMethods :: Float (1) -
JSON
:: Generator :: GeneratorMethods :: Hash (1) -
JSON
:: Generator :: GeneratorMethods :: Integer (1) -
JSON
:: Generator :: GeneratorMethods :: NilClass (1) -
JSON
:: Generator :: GeneratorMethods :: Object (1) -
JSON
:: Generator :: GeneratorMethods :: String (1) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (1) - Kernel (17)
- MonitorMixin (1)
-
Net
:: HTTPExceptions (1) -
Net
:: HTTPHeader (35) -
OpenURI
:: Meta (8) -
OptionParser
:: Arguable (7) -
REXML
:: StreamListener (1) -
Rake
:: Cloneable (2) -
Rake
:: TaskManager (10) - TSort (8)
キーワード
- != (1)
- !~ (1)
- % (6)
- & (5)
- * (9)
- ** (4)
- + (9)
- +@ (1)
- -@ (3)
-
/ (5) - < (5)
- << (9)
- <= (5)
- <=> (16)
- == (24)
- === (9)
- =~ (5)
- > (5)
- >= (5)
- >> (3)
- JSON (1)
- [] (30)
- []= (14)
- ^ (4)
-
_ _ id _ _ (1) -
_ _ send _ _ (2) -
_ dump (2) -
_ load (1) - abbrev (1)
-
abort
_ on _ exception (1) - abs (2)
-
absolute
_ path (2) - accept (1)
- add (4)
-
add
_ attribute (2) -
add
_ attributes (1) -
add
_ dependency (1) -
add
_ development _ dependency (1) -
add
_ element (1) -
add
_ field (1) -
add
_ namespace (1) -
add
_ runtime _ dependency (1) -
add
_ trace _ func (1) - adjugate (1)
-
alias
_ method (1) - all? (6)
- allbits? (1)
- ancestors (1)
- angle (1)
-
angle
_ with (1) - antisymmetric? (1)
- any? (4)
- anybits? (1)
- append (1)
-
append
_ features (1) - arg (3)
-
arg
_ config (1) - arity (3)
-
array
_ nl (1) -
as
_ list (1) - ascend (1)
- asctime (1)
- at (1)
- attr (3)
-
attr
_ accessor (1) -
attr
_ reader (1) -
attr
_ writer (1) - attribute (1)
-
attribute
_ of (1) -
attributes
_ of (1) - autoload (1)
- autoload? (1)
- b (1)
- backtrace (2)
-
backtrace
_ locations (3) -
base
_ label (2) -
base
_ uri (1) -
basic
_ auth (1) - begin (2)
-
beginning
_ of _ line? (1) - between? (1)
- bind (1)
-
bind
_ call (2) - binding (1)
- binread (1)
- birthtime (1)
-
bit
_ length (1) - blksize (1)
- blocks (1)
- body (2)
-
body
_ stream (1) -
body
_ stream= (1) - bol? (1)
- broadcast (1)
- bsearch (4)
-
bsearch
_ index (2) -
by
_ col _ or _ row (1) -
by
_ col _ or _ row! (1) -
by
_ row (1) -
by
_ row! (1) - bytes (3)
- bytesize (1)
- byteslice (3)
- call (3)
-
callee
_ id (1) - canonname (1)
- capitalize (1)
- capitalize! (1)
- captures (1)
- casecmp (2)
- casecmp? (2)
- ceil (6)
- center (1)
- chain (1)
- chardev? (1)
- charpos (1)
- chars (2)
- charset (2)
- check (1)
-
check
_ circular? (1) -
check
_ until (1) - children (3)
- chomp (1)
- chomp! (1)
- chop (1)
- chop! (1)
- chown (1)
- chr (3)
- chunk (3)
-
chunk
_ while (1) - chunked? (1)
- clamp (2)
-
class
_ eval (1) -
class
_ exec (1) -
class
_ variable _ get (1) -
class
_ variable _ set (1) -
class
_ variables (1) - cleanpath (1)
- clear (4)
-
clear
_ bit! (1) -
clear
_ exclude (1) - clone (2)
- close (3)
-
close
_ write (1) - closed? (2)
- cmp (1)
- code (1)
- codepoints (2)
- coerce (6)
-
cofactor
_ expansion (1) -
col
_ sep (1) - collect (9)
- collect! (6)
- collect2 (2)
-
collect
_ concat (3) - column (2)
-
column
_ vectors (1) - combination (2)
- compact (2)
- compact! (1)
-
compare
_ by _ identity (1) -
compare
_ by _ identity? (1) - component (1)
- concat (6)
- configure (1)
- conj (1)
- conjugate (2)
- connect (1)
-
connect
_ from (2) -
const
_ defined? (1) -
const
_ get (1) -
const
_ source _ location (1) - constants (1)
- content (1)
-
content
_ encoding (1) -
content
_ length (1) -
content
_ length= (1) -
content
_ range (1) -
content
_ type (2) -
content
_ type= (1) - convert (4)
- converters (1)
- convpath (1)
- count (7)
- covector (1)
-
create
_ makefile (1) - crypt (1)
- ctime (1)
-
current
_ scope (1) - curry (3)
- cycle (3)
-
datetime
_ format (1) -
datetime
_ format= (1) - day (1)
- debug (2)
- deconstruct (1)
-
deconstruct
_ keys (1) -
def
_ class (1) -
def
_ method (1) -
def
_ module (1) -
default
_ argv (1) -
default
_ event _ sources (1) -
default
_ proc (1) -
define
_ task (1) -
defined
_ class (1) - delete (9)
- delete! (1)
-
delete
_ all (2) -
delete
_ at (1) -
delete
_ attribute (1) -
delete
_ element (1) -
delete
_ if (5) -
delete
_ namespace (1) -
delete
_ prefix (1) -
delete
_ prefix! (1) -
delete
_ suffix (1) -
delete
_ suffix! (1) - denominator (4)
-
deprecate
_ constant (1) - deq (2)
- descend (1)
-
destination
_ encoding (1) - det (1)
- detect (2)
- determinant (1)
- dev (1)
-
dev
_ major (1) -
dev
_ minor (1) - difference (2)
- dig (2)
- digest (1)
- digest! (1)
- digits (2)
- directory? (1)
- dirname (1)
- disable (2)
- disasm (1)
- disassemble (1)
- div (2)
- divmod (2)
-
do
_ not _ reverse _ lookup (1) - downcase (1)
- downcase! (1)
- downto (2)
- drop (1)
-
drop
_ while (5) - dump (1)
- dup (1)
- each (28)
-
each
_ attribute (1) -
each
_ byte (5) -
each
_ capitalized _ name (1) -
each
_ char (3) -
each
_ child (4) -
each
_ codepoint (5) -
each
_ cons (2) -
each
_ element _ with _ attribute (1) -
each
_ element _ with _ text (1) -
each
_ entry (3) -
each
_ grapheme _ cluster (2) -
each
_ header (1) -
each
_ index (1) -
each
_ key (2) -
each
_ line (11) -
each
_ name (1) -
each
_ pair (3) -
each
_ slice (2) -
each
_ strongly _ connected _ component (2) -
each
_ strongly _ connected _ component _ from (2) -
each
_ value (2) -
each
_ with _ index (6) -
each
_ with _ object (2) - eager (1)
-
egrep
_ cpp (2) - eigen (1)
- eigensystem (1)
- element (1)
-
elements
_ to _ f (1) -
elements
_ to _ i (1) -
elements
_ to _ r (1) - empty? (4)
- enable (2)
- encode (3)
- encode! (2)
- encoding (2)
- end (2)
-
end
_ with? (1) - enter (1)
- entities (1)
- entity (2)
- entitydecl (1)
- entries (3)
-
entrywise
_ product (1) -
enum
_ for (4) - environment (1)
- eos? (1)
- eql? (16)
- equal? (3)
- error (2)
-
error
_ bytes (1) -
error
_ char (1) - eval (2)
-
eval
_ script (1) - even? (1)
- event (1)
- exact? (1)
- exception (1)
-
excluded
_ from _ list? (1) -
executable
_ real? (1) - execute (4)
- exist? (1)
- existing (1)
- existing! (1)
- exit (1)
- ext (1)
-
external
_ encoding (1) -
external
_ id (1) -
family
_ addrinfo (2) - fatal (2)
- fatal? (1)
- fcntl (1)
- fdiv (3)
- feed (1)
- fetch (7)
- field (1)
- field? (1)
-
field
_ size _ limit (1) - filename (4)
- filename= (1)
- fileno (2)
- fill (2)
- filter (9)
- filter! (4)
-
filter
_ map (3) - find (2)
-
find
_ all (3) -
find
_ index (9) - finish (2)
- finite? (1)
- first (6)
-
first
_ column (1) -
first
_ lineno (2) -
flat
_ map (3) - flatten (2)
- flatten! (1)
- flock (1)
- floor (6)
- fnmatch (1)
- force (1)
-
force
_ encoding (1) -
force
_ quotes? (1) -
form
_ data= (1) -
formatted
_ program _ filename (1) - formatter (1)
- freeze (2)
- friday? (1)
- frozen? (1)
- ftype (1)
-
garbage
_ collect (1) - gcd (1)
- gcdlcm (1)
- gem (1)
- get (2)
- get2 (2)
-
get
_ attribute (1) -
get
_ attribute _ ns (1) -
get
_ byte (1) -
get
_ fields (1) -
get
_ text (1) - getbyte (4)
- getc (2)
- getch (1)
- getopts (3)
- gets (5)
- gid (1)
- glob (2)
-
gmt
_ offset (1) - gmtoff (1)
-
grapheme
_ clusters (2) - grep (3)
-
grep
_ v (3) -
group
_ by (1) - grpowned? (1)
- gsub (4)
- gsub! (5)
-
hadamard
_ product (1) - handler= (1)
-
has
_ elements? (1) - hash (10)
- head (1)
- head2 (2)
- header (2)
-
header
_ converters (1) - headers (3)
- help (1)
- helpfile (1)
- hex (1)
- hexdigest (1)
- hexdigest! (1)
- hour (1)
- hstack (1)
-
http
_ version (1) - httpd (1)
- imag (1)
- imaginary (1)
- import (1)
-
import
_ methods (1) -
in
_ namespace (1) - include? (1)
-
incomplete
_ input? (1) - indent (1)
- index (9)
- infinite? (1)
- info (2)
- inherited (1)
- initialize (1)
- inject (3)
- ino (1)
-
inplace
_ mode (1) -
inplace
_ mode= (1) - insert (2)
-
insert
_ output (1) - inspect (34)
- install (2)
-
install
_ rb (1) -
instance
_ eval (1) -
instance
_ exec (1) -
instance
_ methods (1) -
instance
_ variable _ defined? (1) -
instance
_ variable _ get (1) -
instance
_ variable _ set (1) -
instance
_ variables (1) -
instruction
_ sequence (1) -
int
_ from _ prime _ division (1) - integer? (2)
- intern (2)
-
internal
_ encoding (2) - intersect? (1)
- intersection (2)
- inv (1)
- inverse (1)
- invert (1)
- invkind (1)
-
is
_ a? (1) - iseuc (1)
- j (1)
- jj (1)
- join (2)
-
json
_ creatable? (1) -
keep
_ if (4) - key? (2)
-
kind
_ of? (1) - label (2)
-
laplace
_ expansion (1) - last (4)
-
last
_ column (1) -
last
_ comment (1) -
last
_ description (1) -
last
_ error (1) -
last
_ lineno (1) -
last
_ modified (1) - lazy (2)
- lcm (1)
- length (9)
- level (1)
- lex (1)
-
lib
_ dirs _ for (1) - line (1)
- lineno (3)
- lines (2)
- list (1)
- ljust (1)
- load (1)
-
local
_ address (1) -
local
_ variable _ get (1) - locked? (1)
- log (2)
- lookup (1)
- lstrip (1)
- lstrip! (1)
- lup (1)
-
lup
_ decomposition (1) - magnitude (5)
-
main
_ type (1) - map (9)
- map! (6)
- map2 (1)
-
marshal
_ dump (1) -
marshal
_ load (1) - match (4)
- match? (4)
- matched (1)
- matched? (1)
-
matched
_ size (1) - max (9)
-
max
_ by (4) -
max
_ nesting (1) - mday (1)
- member? (2)
- members (1)
- merge (4)
- merge! (2)
- method (2)
-
method
_ defined? (1) -
method
_ id (1) -
method
_ missing (1) -
method
_ removed (1) - methods (1)
- min (9)
-
min
_ by (4) - minmax (6)
-
minmax
_ by (2) - minor (2)
- mkmf (1)
-
mod
_ add (1) -
mod
_ exp (1) -
mod
_ mul (1) -
mod
_ sub (1) - mode (1)
-
module
_ eval (1) -
module
_ exec (1) -
module
_ function (2) - modulo (3)
- mon (1)
-
mon
_ enter (2) -
mon
_ exit (1) - month (1)
- msg (1)
- name (6)
- name= (1)
-
named
_ captures (2) - names (4)
- namespace (2)
- namespaces (2)
-
need
_ tar (1) -
need
_ tar _ bz2 (1) -
need
_ tar _ gz (1) -
need
_ zip (1) - needed? (1)
- negative? (2)
- new (1)
-
new
_ scope (1) - next (4)
- next! (1)
-
next
_ element (1) -
next
_ values (1) -
next
_ year (1) - nlink (1)
- nobits? (1)
- none? (3)
- norm (1)
- normalize (1)
- nsec (1)
-
num
_ bits (1) -
num
_ bytes (1) -
num
_ waiting (1) - numerator (4)
-
object
_ id (1) -
object
_ nl (1) - oct (1)
- odd? (1)
- offset (2)
-
ole
_ query _ interface (1) - on (12)
-
on
_ head (1) -
on
_ tail (1) - one? (6)
- ord (2)
- order (4)
- order! (4)
-
original
_ dir (1) -
original
_ name (2) - owned? (1)
- owner (2)
- pack (2)
-
package
_ dir (1) -
package
_ dir _ path (1) -
package
_ files (1) - parameters (3)
- parent (1)
- parse (5)
- parse! (2)
-
parse
_ csv (1) - partition (3)
- path (8)
- pathconf (1)
- pathmap (1)
- peek (2)
-
peek
_ values (1) - peep (1)
- permutation (2)
- permute (2)
- permute! (2)
- phase (1)
- pid (1)
- pointer (1)
- pointer= (1)
- pop (3)
- pos (3)
- pos= (1)
- positive? (2)
- post (2)
- post2 (2)
-
post
_ match (2) - pow (2)
-
pre
_ match (2) - pread (1)
- pred (1)
- prefix (1)
- prefixes (2)
- prepend (2)
-
prepend
_ features (1) - prerelease? (1)
-
pretty
_ print (3) -
pretty
_ print _ cycle (1) -
prev
_ float (1) -
prev
_ year (1) - prime? (1)
-
prime
_ division (2) -
prime
_ fasttest? (1) -
primitive
_ convert (4) -
primitive
_ errinfo (1) - print (3)
- printf (1)
- priority (1)
- priority= (1)
- private (4)
-
private
_ class _ method (2) -
private
_ constant (1) -
private
_ instance _ methods (1) -
private
_ method _ defined? (1) - product (2)
- progname (1)
- progname= (1)
-
program
_ name (1) -
prompt
_ mode (1) -
proper
_ subset? (1) -
proper
_ superset? (1) -
protected
_ method _ defined? (1) -
proxy
_ basic _ auth (1) -
psych
_ y (1) - public (2)
-
public
_ method _ defined? (1) -
public
_ send (2) - push (1)
- putback (2)
- puts (2)
- pwrite (1)
- query (1)
- quo (3)
-
quote
_ char (1) - raise (3)
-
raised
_ exception (1) - rakefile (1)
- rand (3)
- range (1)
-
range
_ length (1) - rank (1)
- rationalize (9)
- rdev (1)
-
rdev
_ major (1) -
rdev
_ minor (1) - read (3)
-
read
_ body (2) - readable? (1)
-
readable
_ real? (1) - readbyte (3)
- readchar (2)
- readline (2)
- readlines (5)
- real (1)
- real? (1)
- realdirpath (1)
- realpath (2)
- receiver (3)
- rect (3)
- rectangular (3)
- reduce (3)
- regexp (1)
- regular? (1)
- reject (8)
- reject! (5)
- relative? (1)
-
relative
_ path _ from (1) - release (1)
- reload (1)
- remainder (2)
-
remote
_ address (1) -
remove
_ class _ variable (1) -
remove
_ const (1) -
remove
_ instance _ variable (1) -
remove
_ method (1) - reopen (4)
-
repeated
_ combination (2) -
repeated
_ permutation (2) - replace (4)
- replacement (1)
- replacement= (1)
- replicate (1)
-
report
_ on _ exception (1) -
request
_ body _ permitted? (1) -
request
_ get (2) -
request
_ head (2) -
request
_ post (2) - require (1)
-
required
_ ruby _ version (1) -
required
_ rubygems _ version (1) - reset (1)
- resolve (1)
-
respond
_ to? (1) -
respond
_ to _ missing? (1) - response (1)
-
response
_ body _ permitted? (1) - rest (1)
- rest? (1)
-
rest
_ size (1) - restsize (1)
- result (1)
- resume (1)
-
return
_ headers? (1) -
return
_ value (1) - reverse (1)
- reverse! (1)
-
reverse
_ each (4) - rewind (2)
- rindex (4)
- rjust (1)
- root (1)
- root? (1)
-
root
_ node (1) - rotate (1)
- rotate! (1)
- round (7)
- row (2)
-
row
_ sep (1) -
row
_ vectors (1) - rpartition (1)
- rshift! (1)
- rstrip (1)
- rstrip! (1)
-
ruby2
_ keywords (1) -
ruby
_ opts (1) -
rubygems
_ version (1) - run (2)
- sample (2)
-
satisfied
_ by? (1) - saturday? (1)
- scan (4)
-
scan
_ full (1) -
scan
_ until (1) - scrub (3)
- scrub! (3)
-
search
_ full (1) - sec (1)
- seed (1)
- select (9)
- select! (4)
- self (1)
- send (2)
-
send
_ request (1) - separator (1)
- seplist (1)
-
set
_ backtrace (1) -
set
_ content _ type (1) -
set
_ form _ data (1) -
set
_ range (3) -
set
_ trace _ func (1) - setbyte (1)
- setproperty (2)
-
sev
_ threshold (1) - shift (5)
- signal (1)
- signm (1)
- signo (1)
-
singleton
_ method _ removed (1) -
singleton
_ methods (1) - size (15)
- size? (1)
-
skew
_ symmetric? (1) - skip (1)
-
skip
_ until (1) - sleep (1)
- slice (7)
- slice! (8)
-
slice
_ after (4) -
slice
_ before (5) -
slice
_ when (2) - solve (1)
- sort (4)
- sort! (2)
-
sort
_ by (2) -
sort
_ by! (2) - source (2)
-
source
_ encoding (1) -
source
_ location (4) - space (1)
-
space
_ before (1) - specific? (1)
- split (4)
- squeeze (1)
- squeeze! (1)
- src (1)
-
stand
_ alone? (1) - start (3)
-
start
_ with? (2) - status (1)
- step (12)
- stop? (1)
- store (1)
- strftime (1)
- string (3)
- strip (1)
- strip! (1)
-
strongly
_ connected _ components (1) - struct (1)
- sub (5)
- sub! (4)
-
sub
_ ext (1) -
sub
_ type (1) -
subdomain
_ of? (1) - subsec (1)
- subset? (1)
- subtract (1)
- succ (3)
- succ! (1)
- sum (5)
- summarize (2)
-
summary
_ indent (1) -
summary
_ indent= (1) -
summary
_ width (1) -
summary
_ width= (1) -
super
_ method (1) - superset? (1)
- swapcase (1)
- swapcase! (1)
- synchronize (1)
-
synthesize
_ file _ task (1) - system (1)
- syswrite (1)
- tag (1)
- take (3)
-
take
_ while (6) - tally (2)
- target (1)
- tasks (2)
- tell (2)
- terminate (1)
- text (1)
- then (1)
- thursday? (1)
- times (2)
-
to
_ a (18) -
to
_ ary (3) -
to
_ binary (1) -
to
_ bn (1) -
to
_ c (2) -
to
_ csv (3) -
to
_ d (2) -
to
_ enum (4) -
to
_ f (3) -
to
_ h (8) -
to
_ hash (2) -
to
_ i (8) -
to
_ int (3) -
to
_ json (19) -
to
_ mailtext (1) -
to
_ path (2) -
to
_ proc (6) -
to
_ r (7) -
to
_ regexp (1) -
to
_ rfc822text (1) -
to
_ ruby (2) -
to
_ s (43) -
to
_ set (2) -
to
_ str (2) -
to
_ string (1) -
to
_ sym (1) -
to
_ value (1) - tokenize (2)
-
top
_ level _ tasks (1) - touch (1)
- tr (2)
-
tr
_ s (1) -
tr
_ s! (1) - trace (1)
- transfer (1)
- transform (1)
-
transform
_ keys (3) -
transform
_ keys! (3) -
transform
_ values (2) -
transform
_ values! (2) - transpose (1)
- truncate (8)
- trust (1)
-
try
_ lock (1) - tsort (1)
-
tsort
_ each (2) -
tv
_ nsec (1) -
tv
_ sec (1) -
tv
_ usec (1) - type (1)
-
type
_ params (1) - ucmp (1)
- uid (1)
-
unconverted
_ fields? (1) - undump (1)
- ungetc (1)
-
unicode
_ normalize (1) -
unicode
_ normalize! (1) -
unicode
_ normalized? (1) - union (2)
- uniq (2)
- uniq! (1)
- unknown (2)
- unlink (1)
- unpack (1)
- unpack1 (1)
- unscan (1)
- unshift (1)
- untrust (1)
- untrusted? (1)
- upcase (1)
- upcase! (1)
- update (2)
- upto (3)
-
use
_ readline (1) -
use
_ readline? (1) - usec (1)
-
utc
_ offset (1) -
valid
_ encoding? (1) - value (5)
- values (1)
-
values
_ at (4) - ver (1)
- version (2)
- vstack (1)
-
wait
_ for _ cond (1) -
wait
_ readable (1) -
wait
_ writable (1) - wakeup (1)
- warn (3)
- warning (2)
- wday (1)
-
with
_ defaults (1) -
with
_ index (6) -
with
_ object (2) -
world
_ readable? (1) -
world
_ writable? (1) - writable? (1)
-
writable
_ real? (1) - write (3)
-
write
_ headers? (1) - xpath (1)
- y (1)
- yday (1)
- year (1)
- yield (1)
-
yield
_ self (1) - zero? (2)
- zip (6)
- zone (1)
- | (5)
- ~ (2)
検索結果
先頭5件
-
Gem
:: Specification # required _ ruby _ version -> Gem :: Requirement (83506.0) -
この Gem パッケージを動作させるのに必要な Ruby のバージョンを返します。
この Gem パッケージを動作させるのに必要な Ruby のバージョンを返します。 -
Gem
:: Specification # required _ rubygems _ version -> Gem :: Requirement (83404.0) -
この Gem パッケージを動作させるのに必要な RubyGems のバージョンを返します。
この Gem パッケージを動作させるのに必要な RubyGems のバージョンを返します。 -
Gem
:: Specification # to _ ruby -> String (73606.0) -
自身を再現するための Ruby スクリプトを文字列で返します。
自身を再現するための Ruby スクリプトを文字列で返します。
省略されている値はデフォルト値が使用されます。 -
Psych
:: Nodes :: Node # to _ ruby -> object (73606.0) -
AST を ruby のオブジェクトに変換します。
AST を ruby のオブジェクトに変換します。 -
Rake
:: TestTask # ruby _ opts -> Array (73606.0) -
テスト実行時に Ruby コマンドに渡されるオプションを返します。
テスト実行時に Ruby コマンドに渡されるオプションを返します。 -
Rational
# -(other) -> Rational | Float (73030.0) -
差を計算します。
差を計算します。
@param other 自身から引く数
other に Float を指定した場合は、計算結果を Float で返しま
す。
//emlist[例][ruby]{
r = Rational(3, 4)
r - 1 # => (-1/4)
r - 0.5 # => 0.25
//} -
Integer
# -(other) -> Numeric (72958.0) -
算術演算子。差を計算します。
算術演算子。差を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[][ruby]{
4 - 1 #=> 3
//} -
Gem
:: Specification # rubygems _ version -> String (64504.0) -
この Gem パッケージを作成した RubyGems のバージョンを返します。
この Gem パッケージを作成した RubyGems のバージョンを返します。 -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (63994.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッドでこの文字列にアクセス出来ます。
注意: 変換後のバイナリデータはポータブルではありません。 to_binary で得たバイナリデータは他のマシンに移動できません。他... -
Array
# -(other) -> Array (63976.0) -
自身から other の要素を取り除いた配列を生成して返します。
自身から other の要素を取り除いた配列を生成して返します。
要素の同一性は Object#eql? により評価されます。
self 中で重複していて、other中に存在していなかった要素は、その重複が保持されます。
@param other 自身から取り除きたい要素の配列を指定します。
配列以外のオブジェクトを指定した場合は to_ary メソッドによ
る暗黙の型変換を試みます。
@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します... -
Float
# -(other) -> Float (63958.0) -
算術演算子。差を計算します。
算術演算子。差を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 差
4.5 - 1.3 # => 3.2
//} -
RubyVM
:: AbstractSyntaxTree :: Node # first _ column -> Integer (63958.0) -
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_column # => 0
//} -
RubyVM
:: AbstractSyntaxTree :: Node # first _ lineno -> Integer (63958.0) -
ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_lineno # => 1
//} -
Vector
# r -> Float (63943.0) -
ベクトルの大きさ(ノルム)を返します。
ベクトルの大きさ(ノルム)を返します。
//emlist[例][ruby]{
require 'matrix'
Vector[3, 4].norm # => 5.0
Vector[Complex(0, 1), 0].norm # => 1.0
//}
@see Vector#normalize -
Gem
:: Requirement # prerelease? -> bool (63940.0) -
何らかのバージョンがプレリリースのものであれば、true を返します。
何らかのバージョンがプレリリースのものであれば、true を返します。
//emlist[][ruby]{
p Gem::Requirement.new("< 5.0").prerelease? # => false
p Gem::Requirement.new("< 5.0a").prerelease? # => true
//} -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (63940.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
[1, 2, 3].to_json # => "[1,2,3]"
//} -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (63922.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
self が表す命令シーケンスの 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2 -
Module
# ruby2 _ keywords(method _ name , . . . ) -> nil (55690.0) -
For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.
For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument... -
String
# lstrip -> String (55654.0) -
文字列の先頭にある空白文字を全て取り除いた新しい文字列を返します。 空白文字の定義は " \t\r\n\f\v\0" です。
文字列の先頭にある空白文字を全て取り除いた新しい文字列を返します。
空白文字の定義は " \t\r\n\f\v\0" です。
//emlist[例][ruby]{
p " abc\n".lstrip #=> "abc\n"
p "\t abc\n".lstrip #=> "abc\n"
p "abc\n".lstrip #=> "abc\n"
//}
@see String#strip, String#rstrip -
String
# strip -> String (55654.0) -
文字列先頭と末尾の空白文字を全て取り除いた文字列を生成して返します。 空白文字の定義は " \t\r\n\f\v\0" です。
文字列先頭と末尾の空白文字を全て取り除いた文字列を生成して返します。
空白文字の定義は " \t\r\n\f\v\0" です。
//emlist[例][ruby]{
p " abc \r\n".strip #=> "abc"
p "abc\n".strip #=> "abc"
p " abc".strip #=> "abc"
p "abc".strip #=> "abc"
p " \0 abc \0".strip #=> "abc"
str = "\tabc\n"
p str.strip ... -
StringScanner
# string -> String (55648.0) -
スキャン対象にしている文字列を返します。
スキャン対象にしている文字列を返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.string # => "test string"
//}
返り値は freeze されていません。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.string.frozen? # => false
//}
なお、このメソッドは StringScanner.new に渡した
文字列をその... -
Rational
# rationalize(eps = 0) -> Rational (55612.0) -
自身から eps で指定した許容誤差の範囲に収まるような Rational を返 します。
自身から eps で指定した許容誤差の範囲に収まるような Rational を返
します。
eps を省略した場合は self を返します。
@param eps 許容する誤差
//emlist[例][ruby]{
r = Rational(5033165, 16777216)
r.rationalize # => (5033165/16777216)
r.rationalize(Rational(0.01)) # => (3/10)
r.rationalize(Rational(0.1)) # => (1/3)
//} -
StringIO
# string -> String (55540.0) -
自身が表す文字列を返します。
自身が表す文字列を返します。
返されるのは生成時に与えられたバッファとして使われている文字列です。
文字列は複製されないことに注意して下さい。
//emlist[例][ruby]{
require "stringio"
sio = StringIO.new
sio << "abc"
s = sio.string
p s #=> "abc"
sio << "xyz"
p s #=> "abcxyz"
//} -
String
# rstrip -> String (55372.0) -
文字列の末尾にある空白文字を全て取り除いた新しい文字列を返します。 空白文字の定義は " \t\r\n\f\v\0" です。
文字列の末尾にある空白文字を全て取り除いた新しい文字列を返します。
空白文字の定義は " \t\r\n\f\v\0" です。
//emlist[例][ruby]{
p " abc\n".rstrip #=> " abc"
p " abc \t\r\n\0".rstrip #=> " abc"
p " abc".rstrip #=> " abc"
p " abc\0 ".rstrip #=> " abc"
str = "abc\n"
p str.rstrip #=> "abc"
p str ... -
BasicSocket
# remote _ address -> Addrinfo (55258.0) -
getpeername(2) で得られたリモートアドレス情報を Addrinfo オブジェクトとして返します。
getpeername(2) で得られたリモートアドレス情報を
Addrinfo オブジェクトとして返します。
返されたオブジェクトの Addrinfo#protocol は 0 を
返すことに注意してください。
require 'socket'
TCPSocket.open("www.ruby-lang.org", 80) {|s|
p s.remote_address #=> #<Addrinfo: 221.186.184.68:80 TCP>
}
TCPServer.open("127.0.0.1", 1728) {|serv|
c = TCP... -
Enumerable
# partition -> Enumerator (55240.0) -
各要素を、ブロックの条件を満たす要素と満たさない要素に分割します。 各要素に対してブロックを評価して、その値が真であった要素の配列と、 偽であった要素の配列の 2 つを配列に入れて返します。
各要素を、ブロックの条件を満たす要素と満たさない要素に分割します。
各要素に対してブロックを評価して、その値が真であった要素の配列と、
偽であった要素の配列の 2 つを配列に入れて返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0].partition {|i| i % 3 == 0 }
#=> [[9, 6, 3, 0], [10, 8, 7, 5, 4, 2, 1]]
//} -
Enumerable
# partition {|item| . . . } -> [[object] , [object]] (55240.0) -
各要素を、ブロックの条件を満たす要素と満たさない要素に分割します。 各要素に対してブロックを評価して、その値が真であった要素の配列と、 偽であった要素の配列の 2 つを配列に入れて返します。
各要素を、ブロックの条件を満たす要素と満たさない要素に分割します。
各要素に対してブロックを評価して、その値が真であった要素の配列と、
偽であった要素の配列の 2 つを配列に入れて返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0].partition {|i| i % 3 == 0 }
#=> [[9, 6, 3, 0], [10, 8, 7, 5, 4, 2, 1]]
//} -
Module
# prepend _ features(mod) -> self (55240.0) -
Module#prepend から呼び出されるメソッドで、 prepend の処理の実体です。このメソッド自体は mod で指定した モジュール/クラスの継承チェインの先頭に self を追加します。
Module#prepend から呼び出されるメソッドで、
prepend の処理の実体です。このメソッド自体は mod で指定した
モジュール/クラスの継承チェインの先頭に self を追加します。
このメソッドを上書きすることで、prepend の処理を変更したり
追加したりすることができます。
@param mod prepend を呼び出したモジュール
@return mod が返されます
//emlist[例][ruby]{
class Recorder
RECORDS = []
end
module X
def self.prepend_features(mod)
... -
Module
# protected _ method _ defined?(name , inherit=true) -> bool (55240.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が protected であるときに true を返します。 そうでなければ false を返します。
インスタンスメソッド name がモジュールに定義されており、
しかもその可視性が protected であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義されたメソッドも対象になります。
@see Module#method_defined?, Module#public_method_defined?, Module#private_method_defined?
//e... -
String
# rstrip! -> self | nil (55072.0) -
文字列の末尾にある空白文字を全て破壊的に取り除きます。 空白文字の定義は " \t\r\n\f\v\0" です。
文字列の末尾にある空白文字を全て破壊的に取り除きます。
空白文字の定義は " \t\r\n\f\v\0" です。
//emlist[例][ruby]{
str = " abc\n"
p str.rstrip! # => " abc"
p str # => " abc"
str = " abc \r\n\t\v\0"
p str.rstrip! # => " abc"
p str # => " abc"
//}
@see String#rstrip, String#lstrip -
String
# strip! -> self | nil (55054.0) -
先頭と末尾の空白文字を全て破壊的に取り除きます。 空白文字の定義は " \t\r\n\f\v\0" です。
先頭と末尾の空白文字を全て破壊的に取り除きます。
空白文字の定義は " \t\r\n\f\v\0" です。
strip! は、内容を変更した self を返します。
ただし取り除く空白がなかったときは nil を返します。
//emlist[例][ruby]{
str = " abc\r\n"
p str.strip! #=> "abc"
p str #=> "abc"
str = "abc"
p str.strip! #=> nil
p str #=> "abc"
str = " \0 abc \0"
str.st... -
String
# lstrip! -> self | nil (55036.0) -
文字列の先頭にある空白文字を全て破壊的に取り除きます。 空白文字の定義は " \t\r\n\f\v\0" です。
文字列の先頭にある空白文字を全て破壊的に取り除きます。
空白文字の定義は " \t\r\n\f\v\0" です。
lstrip! は self を変更して返します。
ただし取り除く空白がなかったときは nil を返します。
//emlist[例][ruby]{
str = " abc"
p str.lstrip! # => "abc"
p str # => "abc"
str = "abc"
p str.lstrip! # => nil
p str # => "abc"
//} -
Matrix
# antisymmetric? -> bool (55030.0) -
行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。
行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します
//emlist[][ruby]{
require 'matrix'
Matrix[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix.empty.antisymmetric? # => true
Matrix[[1, 2, 3], [... -
Matrix
# skew _ symmetric? -> bool (55030.0) -
行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。
行列が反対称行列 (交代行列、歪〔わい〕対称行列とも) ならば true を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します
//emlist[][ruby]{
require 'matrix'
Matrix[[0, -2, Complex(1, 3)], [2, 0, 5], [-Complex(1, 3), -5, 0]].antisymmetric? # => true
Matrix.empty.antisymmetric? # => true
Matrix[[1, 2, 3], [... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (55012.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 ... -
Psych
:: Nodes :: Node # transform -> object (55006.0) -
AST を ruby のオブジェクトに変換します。
AST を ruby のオブジェクトに変換します。 -
Complex
# -(other) -> Complex (54976.0) -
差を計算します。
差を計算します。
@param other 自身から引く数
//emlist[例][ruby]{
Complex(1, 2) - Complex(2, 3) # => (-1-1i)
//} -
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (54976.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
自身のエンコードは UTF-8 であるべきです。
"\u????" のように UTF-16 ビッグエンディアンでエンコードされた文字列を返すことがあります。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]... -
RubyVM
:: InstructionSequence # to _ a -> Array (54976.0) -
self の情報を 14 要素の配列にして返します。
self の情報を 14 要素の配列にして返します。
命令シーケンスを以下の情報で表します。
: magic
データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。
: major_version
命令シーケンスのメジャーバージョン。
: minor_version
命令シーケンスのマイナーバージョン。
: format_type
データフォーマットを示す数値。常に 1。
: misc
以下の要素から構成される Hash オブジェクト。
:arg_size: メソッド、ブ... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (54958.0) -
self のデバッグ用の情報を含んだ文字列を返します。
self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//} -
RubyVM
:: AbstractSyntaxTree :: Node # last _ column -> Integer (54958.0) -
ソースコード中で、self を表すテキストが最後に現れる列番号を返します。
ソースコード中で、self を表すテキストが最後に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.last_column # => 5
//} -
RubyVM
:: AbstractSyntaxTree :: Node # last _ lineno -> Integer (54958.0) -
ソースコード中で、self を表すテキストが最後に現れる行番号を返します。
ソースコード中で、self を表すテキストが最後に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.last_lineno # => 1
//} -
Gem
:: Requirement # pretty _ print(pp) -> String (54940.0) -
わかりやすい形で、条件を表す文字列を返します。 pp メソッドで出力する際に、内部で用いられます。
わかりやすい形で、条件を表す文字列を返します。
pp メソッドで出力する際に、内部で用いられます。
@param PP :PP オブジェクトを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new(["< 5.0", ">= 1.9"])
pp req # => Gem::Requirement.new(["< 5.0", ">= 1.9"])
//} -
JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String (54940.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
"false" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
false.to_json # => "false"
//} -
JSON
:: Generator :: GeneratorMethods :: Float # to _ json(state _ or _ hash = nil) -> String (54940.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
(1.0).to_json # => "1.0"
//} -
JSON
:: Generator :: GeneratorMethods :: Hash # to _ json(state _ or _ hash = nil) -> String (54940.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
person = { "name" => "tanaka", "age" => 19 }
person.to_json # ... -
JSON
:: Generator :: GeneratorMethods :: Integer # to _ json(state _ or _ hash = nil) -> String (54940.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
10.to_json # => "10"
//} -
JSON
:: Generator :: GeneratorMethods :: NilClass # to _ json(state _ or _ hash = nil) -> String (54940.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
"null" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
nil.to_json # => "null"
//} -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (54940.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby... -
JSON
:: Generator :: GeneratorMethods :: TrueClass # to _ json(state _ or _ hash = nil) -> String (54940.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
"true" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
true.to_json # => "true"
//} -
RubyVM
:: InstructionSequence # inspect -> String (54940.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path -
Struct
# deconstruct -> [object] (54940.0) -
構造体のメンバの値を配列にいれて返します。
構造体のメンバの値を配列にいれて返します。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345).to_a
# => ["Joe Smith", "123 Maple, Anytown NC", 12345]
//}
[注意] 本メソッドの記述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してくだ... -
Struct
# deconstruct _ keys(array _ of _ names) -> Hash (54940.0) -
self のメンバの名前と値の組を Hash で返します。
self のメンバの名前と値の組を Hash で返します。
@param array_of_names 返り値に含めるメンバの名前の配列を指定します。nil の場合は全てのメンバを意味します。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
h = joe.deconstruct_keys([:zip, :address])
h # => {:zip=>12345, :address... -
TSort
# tsort -> Array (54940.0) -
頂点をトポロジカルソートして得られる配列を返します。 この配列は子から親に向かってソートされています。 すなわち、最初の要素は子を持たず、最後の要素は親を持ちません。
頂点をトポロジカルソートして得られる配列を返します。
この配列は子から親に向かってソートされています。
すなわち、最初の要素は子を持たず、最後の要素は親を持ちません。
@raise TSort::Cyclic 閉路が存在するとき、発生します。
//emlist[使用例][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end
... -
TSort
# tsort _ each -> Enumerator (54940.0) -
TSort#tsort メソッドのイテレータ版です。 obj.tsort_each は obj.tsort.each と似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
TSort#tsort メソッドのイテレータ版です。
obj.tsort_each は obj.tsort.each と似ていますが、
ブロックの評価中に obj が変更された場合は予期しない結果になる
ことがあります。
tsort_each は nil を返します。
閉路が存在するとき、例外 TSort::Cyclic を起こします。
@raise TSort::Cyclic 閉路が存在するとき、発生します.
//emlist[使用例][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node... -
TSort
# tsort _ each {|node| . . . } -> nil (54940.0) -
TSort#tsort メソッドのイテレータ版です。 obj.tsort_each は obj.tsort.each と似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
TSort#tsort メソッドのイテレータ版です。
obj.tsort_each は obj.tsort.each と似ていますが、
ブロックの評価中に obj が変更された場合は予期しない結果になる
ことがあります。
tsort_each は nil を返します。
閉路が存在するとき、例外 TSort::Cyclic を起こします。
@raise TSort::Cyclic 閉路が存在するとき、発生します.
//emlist[使用例][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (54904.0) -
self が表す命令シーケンスの絶対パスを返します。
self が表す命令シーケンスの絶対パスを返します。
self を文字列から作成していた場合は nil を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.... -
RubyVM
:: InstructionSequence # path -> String (54904.0) -
self が表す命令シーケンスの相対パスを返します。
self が表す命令シーケンスの相対パスを返します。
self の作成時に指定した文字列を返します。self を文字列から作成していた
場合は "<compiled>" を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compi... -
RubyVM
:: AbstractSyntaxTree :: Node # children -> Array (54658.0) -
self の子ノードを配列で返します。
self の子ノードを配列で返します。
どのような子ノードが返ってくるかは、そのノードの type によって異なります。
戻り値は、ほかの RubyVM::AbstractSyntaxTree::Node のインスタンスや nil を含みます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.children
# => [[], nil, #<RubyVM::AbstractSyntaxTree::Node:OPCALL@1:0-1:5>]
//} -
RubyVM
:: AbstractSyntaxTree :: Node # type -> Symbol (54640.0) -
self の種類を Symbol で返します。
self の種類を Symbol で返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.type # => :SCOPE
//} -
Time
# strftime(format) -> String (48202.0) -
時刻を format 文字列に従って文字列に変換した結果を返します。
時刻を format 文字列に従って文字列に変換した結果を返します。
@param format フォーマット文字列を指定します。使用できるものは 以下の通りです。
* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月の名称(January, February ... )
* %b: 月の省略名(Jan, Feb ... )
* %C: 世紀 (2009年であれば 20)
* %c: 日付と時刻 (%a %b %e %T %Y)
* %D: 日付 (%m/%d/%y)
* ... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (48076.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (47776.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (47440.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_comp... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (47302.0) -
型が持つソースインターフェイスを取得します。
型が持つソースインターフェイスを取得します。
default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。
@return デフォルトのソースインターフェイスをWIN32OLE_TYPEの配列と
して返します。返すのは配列ですが、デフォルトのソースインターフェ
イスは最大でも1インターフェイスです。ソースインターフェイスを持
たない場合は空配列を返します。
tobj = ... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (47176.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Encoding
:: Converter # primitive _ errinfo -> Array (46870.0) -
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
@return [result, enc1, enc2, error_bytes, readagain_bytes] という五要素の配列
result は直前の primitive_convert の戻り値です。
それ以外の四要素は :invalid_byte_sequence か :incomplete_input か :undefined_conversion だった場合に意味を持ちます。
enc1 はエラーの発生した原始変換の変換元のエンコーディング... -
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (46840.0) -
要素から key という属性名の属性を削除します。
要素から key という属性名の属性を削除します。
削除された属性を返します。
key という属性名の属性が存在しない場合は削除されずに、nil を返します。
@param key 削除する要素(文字列(属性名) or REXML::Attributeオブジェクト)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("E")
e.add_attribute("x", "foo"); e # => <E x='foo'/>
e.add_attribute("y:x", "bar"); e # => <E x... -
String
# tr(pattern , replace) -> String (46636.0) -
pattern 文字列に含まれる文字を検索し、 それを replace 文字列の対応する文字に置き換えます。
pattern 文字列に含まれる文字を検索し、
それを replace 文字列の対応する文字に置き換えます。
pattern の形式は tr(1) と同じです。つまり、
`a-c' は a から c を意味し、"^0-9" のように
文字列の先頭が `^' の場合は指定文字以外が置換の対象になります。
replace に対しても `-' による範囲指定が可能です。
`-' は文字列の両端にない場合にだけ範囲指定の意味になります。
`^' も文字列の先頭にあるときにだけ否定の効果を発揮します。
また、`-', `^', `\' はバックスラッシュ (`\') によりエスケープできます。
... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (46576.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (46558.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (46540.0) -
各属性に対しブロックを呼び出します。
各属性に対しブロックを呼び出します。
個々の属性は REXML::Attribute オブジェクトで渡されます。
//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 = doc.get_elements("/root... -
String
# tr _ s(pattern , replace) -> String (46348.0) -
文字列の中に pattern 文字列に含まれる文字が存在したら、 replace 文字列の対応する文字に置き換えます。さらに、 置換した部分内に同一の文字の並びがあったらそれを 1 文字に圧縮します。
文字列の中に pattern 文字列に含まれる文字が存在したら、
replace 文字列の対応する文字に置き換えます。さらに、
置換した部分内に同一の文字の並びがあったらそれを 1 文字に圧縮します。
pattern の形式は tr(1) と同じです。
つまり「a-c」は a から c を意味し、
"^0-9" のように文字列の先頭が「^」の場合は指定した文字以外が置換の対象になります。
replace でも「-」を使って範囲を指定できます。
「-」は文字列の両端にない場合にだけ範囲指定の意味になります。
同様に、「^」もその効果は文字列の先頭にあるときだけです。
また、「-」、「^」... -
Pathname
# realpath -> Pathname (46330.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。
self が指すパスが存在しない場合は例外 Errno::ENOENT が発生します。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/b... -
Pathname
# realpath(basedir = nil) -> Pathname (46330.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。
self が指すパスが存在しない場合は例外 Errno::ENOENT が発生します。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/b... -
Vector
# elements _ to _ r -> Vector (46279.0) -
ベクトルの各成分をRationalに変換したベクトルを返します。
ベクトルの各成分をRationalに変換したベクトルを返します。
このメソッドは deprecated です。 map(&:to_r) を使ってください。
//emlist[例][ruby]{
require 'matrix'
v = Vector.elements([2.5, 3.0, 5.75, 7])
p v.elements_to_r
# => Vector[(5/2), (3/1), (23/4), (7/1)]
//} -
Thread
# priority -> Integer (46276.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。
メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの
priority を引き継ぎます。
@param val スレッドの優先度を指定します。プラットフォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b = Thread.new do
... -
StringIO
# write(*obj) -> Integer (46258.0) -
自身に obj を書き込みます。obj が文字列でなければ to_s による文字列化を試みます。 書き込まれた文字列の長さを返します。
自身に obj を書き込みます。obj が文字列でなければ to_s による文字列化を試みます。
書き込まれた文字列の長さを返します。
全ての出力メソッドは、最終的に「write」という名のメソッドを呼び出すので、
このメソッドを置き換えることで出力関数の挙動を変更することができます。
@param obj 書き込みたいオブジェクトを指定します。
@raise IOError 自身が書き込み可能でない時に発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("hoge", 'r+')
a.write("aaa") ... -
Enumerator
:: Yielder # to _ proc -> Proc (46240.0) -
Enumerator.new で使うメソッドです。
Enumerator.new で使うメソッドです。
引数を Enumerator::Yielder#yield に渡す Proc を返します。
これは Enumerator::Yielder オブジェクトを他のメソッドにブロック引数と
して直接渡すために使えます。
//emlist[例][ruby]{
text = <<-END
Hello
こんにちは
END
enum = Enumerator.new do |y|
text.each_line(&y)
end
enum.each do |line|
p line
end
# => "Hello\n"
# "こんにちは... -
Matrix
# entrywise _ product(m) -> Matrix (46240.0) -
アダマール積(要素ごとの積)を返します。
アダマール積(要素ごとの積)を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します。
//emlist[例][ruby]{
require 'matrix'
Matrix[[1,2], [3,4]].hadamard_product(Matrix[[1,2], [3,2]]) # => Matrix[[1, 4], [9, 8]]
//} -
Matrix
# tr -> Integer | Float | Rational | Complex (46240.0) -
トレース (trace) を返します。
トレース (trace) を返します。
行列のトレース (trace) とは、対角要素の和です。
//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}
trace は正方行列でのみ定義されます。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します -
Matrix
# trace -> Integer | Float | Rational | Complex (46240.0) -
トレース (trace) を返します。
トレース (trace) を返します。
行列のトレース (trace) とは、対角要素の和です。
//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}
trace は正方行列でのみ定義されます。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します -
Method
# super _ method -> Method | nil (46240.0) -
self 内で super を実行した際に実行されるメソッドを Method オブジェ クトにして返します。
self 内で super を実行した際に実行されるメソッドを Method オブジェ
クトにして返します。
@see UnboundMethod#super_method
//emlist[例][ruby]{
class Super
def foo
"superclass method"
end
end
class Sub < Super
def foo
"subclass method"
end
end
m = Sub.new.method(:foo) # => #<Method: Sub#foo>
m.call # => "subclass me... -
Pathname
# realdirpath(basedir = nil) -> Pathname (46240.0) -
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require "pathname"
path = Pathname("/not_exist")
path.realdirpath # => #<Pathname:/not_exist>
path.realpath # => Errno::ENOENT
# 最後ではないコンポーネント(/not_exist_1)も存在し... -
Pathname
# relative _ path _ from(base _ directory) -> Pathname (46240.0) -
base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。
base_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。
パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。
self が相対パスなら base_directory も相対パス、self が絶対パスなら
base_directory も絶対パスでなければなりません。
@param base_directory ベースディレクトリを表す Pathname オブジェクトを指定します。
@raise ArgumentError Windows上でドライブが違うなど、base_direct... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (46240.0) -
name という名前の属性を取得します。
name という名前の属性を取得します。
name という名前を持つ属性がない場合は nil を返します。
@param name 属性名(文字列)
@see REXML::Attributes#[]
//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='... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (46240.0) -
namespace と name で特定される属性を返します。
namespace と name で特定される属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使うことで属性を正しく指定することができます。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.ne... -
String
# partition(sep) -> [String , String , String] (46240.0) -
セパレータ sep が最初に登場する部分で self を 3 つに分割し、 [最初のセパレータより前の部分, セパレータ, それ以降の部分] の 3 要素の配列を返します。
セパレータ sep が最初に登場する部分で self を 3 つに分割し、
[最初のセパレータより前の部分, セパレータ, それ以降の部分]
の 3 要素の配列を返します。
self がセパレータを含まないときは、
返り値の第 2 要素と第 3 要素が空文字列になります。
@param sep セパレータを表す文字列か正規表現を指定します。
//emlist[例][ruby]{
p "axaxa".partition("x") # => ["a", "x", "axa"]
p "aaaaa".partition("x") # => ["aaaaa", "", ""]
p ... -
String
# rpartition(sep) -> [String , String , String] (46240.0) -
セパレータ sep が最後に登場する部分で self を 3 つに分割し、 [最後のセパレータより前の部分, セパレータ, それ以降の部分] の 3 要素の配列を返します。
セパレータ sep が最後に登場する部分で self を 3 つに分割し、
[最後のセパレータより前の部分, セパレータ, それ以降の部分]
の 3 要素の配列を返します。
self がセパレータを含まないときは、
返り値の第 1 要素と第 2 要素が空文字列になります。
@param sep セパレータを表す文字列か正規表現を指定します。
//emlist[例][ruby]{
p "axaxa".rpartition("x") # => ["axa", "x", "a"]
p "aaaaa".rpartition("x") # => ["", "", "aaaaa"]
... -
StringScanner
# terminate -> self (46240.0) -
スキャンポインタを文字列末尾後まで進め、マッチ記録を捨てます。
スキャンポインタを文字列末尾後まで進め、マッチ記録を捨てます。
@return self を返します。
pos = self.string.size と同じ動作です。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.scan(/\w+/) # => "test"
s.matched # => "test"
s.pos # => 4
s[0] # => "test"
s.terminate
s.matched # => nil
s[0]... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) -> Enumerator (46240.0) -
node から到達可能な強連結成分についてのイテレータです。
node から到達可能な強連結成分についてのイテレータです。
返す値は規定されていません。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示する][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) {|nodes| . . . } -> () (46240.0) -
node から到達可能な強連結成分についてのイテレータです。
node から到達可能な強連結成分についてのイテレータです。
返す値は規定されていません。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示する][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node... -
TracePoint
# raised _ exception -> Exception (46240.0) -
発生した例外を返します。
発生した例外を返します。
@raise RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/0
rescue
end
//} -
URI
:: MailTo # to _ rfc822text -> String (46228.0) -
URI オブジェクトからメールテキスト文字列を生成します。
URI オブジェクトからメールテキスト文字列を生成します。
例:
require 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext
=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr>
To: ruby-list@ruby-lang.org
Sub... -
Encoding
:: Converter # convert(source _ string) -> String (46210.0) -
与えられた文字列を変換して、変換できた結果を返します。 引数の末尾の文字がバイト列の途中で終わっている場合、そのバイト列は変換器内に取り置かれます。 変換を終了させるには Encoding::Converter#finish を呼びます。
与えられた文字列を変換して、変換できた結果を返します。
引数の末尾の文字がバイト列の途中で終わっている場合、そのバイト列は変換器内に取り置かれます。
変換を終了させるには Encoding::Converter#finish を呼びます。
Encoding::Converter を用いると、文字列の一部または全部を渡して変換を行うことができます。よって、不正なバイトを意識せずにストリームから読み出した文字列を変換したいときには Encoding::Converter が適します。
なお、Encoding::Converter#convert では、これらの例外を捕獲しても、例外を起こしたと... -
Encoding
:: Converter # insert _ output(string) -> nil (46156.0) -
変換器内のバッファに文字列を挿入します。 バッファに保持された文字列は、次の変換時の変換結果と一緒に返されます。
変換器内のバッファに文字列を挿入します。
バッファに保持された文字列は、次の変換時の変換結果と一緒に返されます。
変換先がステートフルなエンコーディングであった場合、
挿入された文字列は状態に基づいて変換され、状態を更新します。
このメソッドは変換に際してエラーが発生した際にのみ利用されるべきです。
@param string 挿入する文字列
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "iso-8859-1")
src = "HIRAGANA LETTER A is \u{3042}."
dst = ""
p ec.... -
String
# tr _ s!(pattern , replace) -> self | nil (46048.0) -
文字列の中に pattern 文字列に含まれる文字が存在したら、 replace 文字列の対応する文字に置き換えます。さらに、 置換した部分内に同一の文字の並びがあったらそれを 1 文字に圧縮します。
文字列の中に pattern 文字列に含まれる文字が存在したら、
replace 文字列の対応する文字に置き換えます。さらに、
置換した部分内に同一の文字の並びがあったらそれを 1 文字に圧縮します。
pattern の形式は tr(1) と同じです。
つまり「a-c」は a から c を意味し、
"^0-9" のように文字列の先頭が「^」の場合は指定した文字以外が置換の対象になります。
replace でも「-」を使って範囲を指定できます。
//emlist[][ruby]{
p "gooooogle".tr_s("a-z", "A-Z") # => "GOGLE"
//}
「... -
Rational
# numerator -> Integer (45994.0) -
分子を返します。
分子を返します。
@return 分子を返します。
//emlist[例][ruby]{
Rational(7).numerator # => 7
Rational(7, 1).numerator # => 7
Rational(9, -4).numerator # => -9
Rational(-2, -10).numerator # => 1
//}
@see Rational#denominator -
Thread
# priority=(val) (45976.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。
メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの
priority を引き継ぎます。
@param val スレッドの優先度を指定します。プラットフォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b = Thread.new do
... -
Integer
# truncate(ndigits = 0) -> Integer (45958.0) -
0 から self までの整数で、自身にもっとも近い整数を返します。
0 から self までの整数で、自身にもっとも近い整数を返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.truncate # => 1
1.truncate(2) # => 1
18.truncate(-1) # => 10
(-18).truncate(-1) # => -10
//}
@see Numeric#truncate