ESM アジャイル事業部 開発者ブログ

永和システムマネジメント アジャイル事業部の開発者ブログです。

Ruby Method Karuta : English Translations of Reading Cards

This article is a list of reading cards for the English version of Ruby Method Karuta.Please see the manual for a detailed overview.

Ruby Method Karuta : English Instruction Manual - ESM アジャイル事業部 開発者ブログ

You can play with Ruby WASM:

Click the above button!

NOTE: Loading WASM takes a little time.

001 : BasicObject#method_missing

Class

BasicObject

Argument

Undefined method name and variable-length arguments.

Return Value

Object

Description

Method called by Ruby interpreter when an invoked method is not defined.

Answer

BasicObject#method_missing

↑Return to the "Next Card"

002 : Object#public_send

Class

Object

Argument

Method name and variable-length arguments

Return Value

Object

Description

Calls the method given as an argument and returns the execution result. Can only call public methods.

Answer

Object#public_send

↑Return to the "Next Card"

003 : Object#send

Class

Object

Argument

Method name and variable-length arguments

Return Value

Object

Description

Calls the method given as an argument and returns the execution result. Can also call private methods.

Answer

Object#send

↑Return to the "Next Card"

004 : Object#is_a?

Class

Object

Argument

Object to compare

Return Value

bool

Description

Determines whether self is an instance of the class given as argument or its subclasses.

Answer

Object#is_a?

↑Return to the "Next Card"

005 : Object#inspect

Class

Object

Argument

None

Return Value

String

Description

Returns a string that represents the object in a human-readable format.

Answer

Object#inspect

↑Return to the "Next Card" button

006 : Object#==

Class

Object

Argument

Object to compare for equality

Return Value

bool

Description

Compares the value equality of objects.

Answer

Object#==

↑Return to the "Next Card" button

007 : Object#equal?

Class

Object

Argument

Object to compare for identity

Return Value

bool

Description

Compares the identity of objects.

Answer

Object#equal?

↑Return to the "Next Card" button

008 : Array#flatten

Class

Array

Argument

Depth of recursion for flattening

Return Value

Array

Description

Returns a new recursively flattened array of self.

Answer

Array#flatten

↑Return to the "Next Card" button

009 : Array#<<

Class

Array

Argument

Object to be added to the receiver

Return Value

self

Description

Destructively appends the argument to the end of self.

Answer

Array#<<

↑Return to the "Next Card" button

010 : Array#filter

Class

Array

Argument

Block for evaluating each element

Return Value

Array

Description

Returns an array containing all elements for which the block returns a truthy value.

Answer

Array#filter

↑Return to the "Next Card" button

011 : Array#reject

Class

Array

Argument

Block for evaluating each element

Return Value

Array

Description

Returns an array containing all elements for which the block returns a false or nil.

Answer

Array#reject

↑Return to the "Next Card" button

012 : Array#size

Class

Array

Argument

None

Return Value

Integer

Description

Returns the number of elements in the array.

Answer

Array#size

↑Return to the "Next Card" button

013 : Array#join

Class

Array

Argument

Optional string separator to be placed between elements

Return Value

String

Description

Returns a concatenated string of array elements.

Answer

Array#join

↑Return to the "Next Card" button

014 : Array#include?

Class

Array

Argument

Object to compare for value equality

Return Value

bool

Description

Determines whether the receiver has an element that is equal to the argument object using ==.

Answer

Array#include?

↑Return to the "Next Card" button

015 : Data.define

Class

Data

Argument

Variable-length arguments to define a value object class

Return Value

Class

Description

Defines a class for an immutable value object.

Answer

Data.define

↑Return to the "Next Card" button

016 : Hash#compact

Class

Hash

Argument

None

Return Value

Hash

Description

Returns a new Hash with nil values removed from self.

Answer

Hash#compact

017 : Hash#merge

Class

Hash

Argument

Hash to be merged

Return Value

Hash

Description

Returns the result of merging the contents of the Hash.

Answer

Hash#merge

↑Return to the "Next Card" button

018 : Hash#transform_keys

Class

Hash

Argument

Block for evaluating each element's key

Return Value

Hash

Description

Returns a Hash with all keys replaced by the result of calling the block on them.

Answer

Hash#transform_keys

019 : Hash#transform_values

Class

Hash

Argument

Block for evaluating each element's value

Return Value

Hash

Description

Returns a Hash with all values replaced by the result of calling the block on them.

Answer

Hash#transform_values

↑Return to the "Next Card" button

020 : Method#source_location

Class

Method

Argument

None

Return Value

Array

Description

Returns an array containing the source code's file name and line number.

Answer

Method#source_location

↑Return to the "Next Card" button

021 : Method#curry

Class

Method

Argument

Optional arity

Return Value

Proc

Description

Returns a curried Proc based on self.

Answer

Method#curry

↑Return to the "Next Card" button

022 : Module#refine

Class

Module

Argument

Class or module to be extended

Return Value

Module

Description

Extends the class specified by the argument with methods, etc. within the block.

Answer

Module#refine

↑Return to the "Next Card" button

023 : Integer#even?

Class

Integer

Argument

None

Return Value

bool

Description

Returns a boolean indicating whether the integer is even.

Answer

Integer#even?

↑Return to the "Next Card" button

024 : Integer#succ

Class

Integer

Argument

None

Return Value

Integer

Description

Returns the next integer of the receiver.

Answer

Integer#succ

↑Return to the "Next Card" button

025 : Proc#<<

Class

Proc

Argument

Object with call method

Return Value

Proc

Description

Returns a Proc composed of self and the argument.

Answer

Proc#<<

↑Return to the "Next Card" button

026 : RubyVM::AbstractSyntaxTree.parse

Class

RubyVM::AbstractSyntaxTree

Argument

Source code string

Return Value

RubyVM::AbstractSyntaxTree::Node

Description

Parses the string into an abstract syntax tree and returns the root node of the tree.

Answer

RubyVM::AbstractSyntaxTree.parse

↑Return to the "Next Card" button

027 : RubyVM::InstructionSequence.compile

Class

RubyVM::InstructionSequence

Argument

Source code string

Return Value

RubyVM::InstructionSequence

Description

Returns the iseq object of the specified Ruby source code in the argument.

Answer

RubyVM::InstructionSequence.compile

↑Return to the "Next Card" button

028 : RubyVM::YJIT.enabled?

Class

RubyVM::YJIT

Argument

None

Return Value

bool

Description

Determines whether YJIT is enabled.

Answer

RubyVM::YJIT.enabled?

↑Return to the "Next Card" button

029 : String#encode

Class

String

Argument

Target encoding

Return Value

String

Description

Returns a string by converting the receiver to the specified character encoding.

Answer

String#encode

↑Return to the "Next Card" button

030 : String#split

Class

String

Argument

Separator for splitting string

Return Value

Array

Description

Splits the string by the separator specified in the argument.

Answer

String#split

↑Return to the "Next Card" button

031 : String#chomp

Class

String

Argument

Optional newline character

Return Value

String

Description

Returns a new string with the newline character specified in the argument removed from the end of self.

Answer

String#chomp

↑Return to the "Next Card" button

032 : String#concat

Class

String

Argument

String to concatenate

Return Value

String

Description

Concatenates self with the string.

Answer

String#concat

↑Return to the "Next Card" button

033 : String#empty?

Class

String

Argument

None

Return Value

bool

Description

Determines whether the string is empty.

Answer

String#empty?

↑Return to the "Next Card" button

034 : String#include?

Class

String

Argument

String to search for

Return Value

bool

Description

Determines whether the argument string is included.

Answer

String#include?

↑Return to the "Next Card" button

035 : String#gsub

Class

String

Argument

Replacement pattern and replacement string

Return Value

String

Description

Replaces all strings that match the pattern.

Answer

String#gsub

↑Return to the "Next Card" button

036 : String#size

Class

String

Argument

None

Return Value

Integer

Description

Returns the length of the string.

Answer

String#size

↑Return to the "Next Card" button

037 : String#match?

Class

String

Argument

Regular expression or string as pattern

Return Value

bool

Description

Determines whether the string matches the pattern.

Answer

String#match?

↑Return to the "Next Card" button

038 : String#strip

Class

String

Argument

None

Return Value

String

Description

Removes leading and trailing whitespace characters.

Answer

String#strip

↑Return to the "Next Card" button

039 : String#chars

Class

String

Argument

None

Return Value

Array

Description

Returns an array of strings for each character in the string.

Answer

String#chars

↑Return to the "Next Card" button

040 : Symbol.all_symbols

Class

Symbol

Argument

None

Return Value

Array

Description

Returns an array of all defined symbol objects.

Answer

Symbol.all_symbols

↑Return to the "Next Card" button

041 : Comparable#clamp

Class

Comparable

Argument

Two values for lower and upper bounds or a Range

Return Value

Object

Description

Returns a value that falls within the specified lower and upper bounds.

Answer

Comparable#clamp

↑Return to the "Next Card" button

042 : Enumerable#map

Class

Enumerable

Argument

Block to evaluate for each element

Return Value

Array

Description

Returns an array containing the result of evaluating the block for each element.

Answer

Enumerable#map

↑Return to the "Next Card" button

043 : Enumerable#lazy

Class

Enumerable

Argument

None

Return Value

Enumerator::Lazy

Description

Returns a lazy enumerator that performs delayed evaluation of self.

Answer

Enumerable#lazy

↑Return to the "Next Card" button

044 : Enumerable#tally

Class

Enumerable

Argument

Optional hash to accumulate results

Return Value

Hash

Description

Returns a hash with the counted occurrences of each element in the enumerable.

Answer

Enumerable#tally

↑Return to the "Next Card" button

045 : Enumerable#each_with_object

Class

Enumerable

Argument

Initial value and block

Return Value

Object

Description

Iteratively passes the initial object and elements to the block and returns the initial object.

Answer

Enumerable#each_with_object

↑Return to the "Next Card" button

046 : GC.disable

Class

GC

Argument

None

Return Value

bool

Description

Disables garbage collection.

Answer

GC.disable

↑Return to the "Next Card" button

047 : Kernel#binding

Class

Kernel

Argument

None

Return Value

Binding

Description

Returns a Binding object containing environment information such as variables and methods.

Answer

Kernel#binding

↑Return to the "Next Card" button

048 : Kernel#puts

Class

Kernel

Argument

Any number of objects to output

Return Value

nil

Description

Outputs to standard output.

Answer

Kernel#puts

↑Return to the "Next Card" button

049 : Math.#sqrt

Class

Math

Argument

Positive real number

Return Value

Float

Description

Returns the square root of the argument.

Answer

Math.#sqrt

↑Return to the "Next Card" button

050 : ObjectSpace.count_objects

Class

ObjectSpace

Argument

Optional Hash

Return Value

Hash

Description

Returns a hash with the count of objects for each type.

Answer

ObjectSpace.count_objects

↑Return to the "Next Card" button