Ruby programming terms

Ruby programming terms

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

\W

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (101)

Section 1

(50 cards)

\W

Front

(regular expression)any nonletter, nondigit or nonunderscore.

Back

.select

Front

array method that selects particular items from an array

Back

&&

Front

Boolean AND operator

Back

.between?(x,y)

Front

method that tells if an argument is within the limits of two numbers

Back

.index

Front

method that tells an argument's place value within an array

Back

.pop

Front

array method that removes last item from an array

Back

.swapcase

Front

a string method that reverses capitalization

Back

.split

Front

a string method that splits a string into an array

Back

.downcase

Front

a string method that uncapitalizes first character

Back

%

Front

the remainder operator

Back

.capitalize

Front

a string method that capitalizes first character

Back

\A

Front

(regular expression)anchor for the start of a string

Back

?x

Front

returns ASCII value of x

Back

\w

Front

(regular expression)any letter, digit or underscore

Back

\d

Front

(regular expression)any digit

Back

!=

Front

comparison operator for "not equal to"

Back

!

Front

operator for "Boolean not"

Back

#{}

Front

interpolation operator

Back

.include?()

Front

an array method that returns TRUE or FALSE if the array contains specified item

Back

\S

Front

(regular expression)any non-whitespace character

Back

\w

Front

(regular expression)any letter, digit or underscore

Back

.next

Front

a string method that changes last character to next alphabetical character

Back

\Z

Front

(regular expression)anchor for the end of a string

Back

.methods

Front

tells you all methods that an object may invoke.

Back

\D

Front

(regular expression)any nondigit

Back

#{}

Front

interpolation operator

Back

.gsub(a, b)

Front

a string method that substitutes ALL occurrences of a string with another.

Back

**

Front

the exponential operator

Back

\d

Front

(regular expression)any digit

Back

.scan()

Front

a string method that scans object for arguments, uses regular expressions.

Back

\Z

Front

(regular expression)anchor for the end of a string

Back

.match(/REGEX/, starting_point)

Front

a string method that outputs the first string matching the defined regular expression from an optionally defined starting point

Back

.map

Front

array method, transforms the contents of an array according to a specified set of rules

Back

\W

Front

(regular expression)any nonletter, nondigit or nonunderscore.

Back

\s

Front

(regular expression)any space, tab, newline or whitespace

Back

.even?

Front

method to determine if an object is an even number

Back

.chop

Front

a string method that removes last character

Back

^

Front

a regular method that is the anchor for the beggining of a line

Back

%arg

Front

sets a text delimiter

Back

\S

Front

(regular expression)any non-whitespace character

Back

\A

Front

(regular expression)anchor for the start of a string

Back

.upcase

Front

a string method that makes string all caps.

Back

.each

Front

an array method that

Back

class

Front

a definition of a concept in an object oriented language.

Back

\s

Front

(regular expression)any space, tab, newline or whitespace

Back

.sort

Front

method that sorts items alphabetically

Back

%q

Front

sets a single character text delimiter for multi-line strings

Back

.sub

Front

a string method that substituition. Requires 2 arguments.

Back

.sub(a, b)

Front

a string method that substitutes THE FIRST occurrence of a string within a string

Back

\D

Front

(regular expression)any nondigit

Back

Section 2

(50 cards)

string

Front

a collection of characters such as "Hello, world!"

Back

@

Front

defines an instance variable, which only exists within the object it was created in.

Back

$

Front

symbol for a global variable, which can be called from anywhere in an application.

Back

regular expressions

Front

a way to describe patterns in text

Back

|x|

Front

passes value into block of code and assigns it the label of "x"

Back

parameters

Front

data passed to methods in parenthesis after a method's name.

Back

yield

Front

tells ruby a value to pass while iterating a block of code

Back

call

Front

runs a proc that has been stored to a variable

Back

inheritance

Front

allows for classes to relate to each other in a hierarchy

Back

code blocks

Front

a section of code with no discrete name which is not a method by itself that can be called upon and can receive an argument.

Back

ARGV

Front

a special array made from arguments that were added to the command line at start up.

Back

float

Front

a number with a decimal point such as 1.0 or 3.1

Back

%w{}

Front

defines array of multiple elements seperated by a space

Back

strip

Front

string method that "cleans" extra spaces from strings

Back

iterator

Front

methods that step through lists element by element (like each, upto, times, etc)

Back

interpolation

Front

mixing expressions into strings

Back

end_with?

Front

string method that determines if a string ends with a defined string

Back

not and or

Front

Boolean not and or (lower preference)

Back

operators

Front

used in an expression to manipulate objects

Back

<=

Front

less than or equal to (comparison operator)

Back

start_with?

Front

string method that determines if a string starts with a defined string

Back

$:.

Front

a variable that lists the directories where Ruby will look for libraries

Back

$

Front

a regular method that is the anchor for the end of a line

Back

@@

Front

defines a class variable. Can be used anywhere within a class

Back

kernel

Front

a module that works everywhere within ruby without being refereed to. Contains many common ruby methods.

Back

method

Front

a set of code within a class or object

Back

break if

Front

conditionally stops a loop

Back

constant

Front

a fixed value, that begins with a capital letter, such as Pi.

Back

object

Front

a single instance of a class.

Back

constant

Front

Data type that is assigned at initialization and typically does not change. Starts with a capital letter.

Back

||

Front

Boolean OR operator

Back

<<

Front

array assignment oprator

Back

hash

Front

a collection of objects or values with associated keys

Back

==

Front

comparison operator for "equal to"

Back

<<

Front

pushes a new item onto the end of an array.

Back

variable

Front

a placeholder for a single object that may be a number, string, list or instance of a defined class

Back

struct

Front

a special class that holds attributes and data but no methods.

Back

<=>

Front

comaprison operator that will read 0 if =, 1 if higher, -1 if lower.

Back

arguments

Front

data passed to methods in parenthesis after a method's name.

Back

<

Front

class inheritance operator.

Back

array

Front

a collection of objects with a defined order

Back

if?then:else

Front

the ternary operator if?then:else

Back

range

Front

the representation of data from a start to end point

Back

>=

Front

greater than or equal to (comparison operator)

Back

flow control

Front

the process of deciding which sections of code to execute based on conditions

Back

|x|

Front

passes value into block of code and assigns it the label of "x"

Back

object orientation

Front

using classes and objects to make real-world concepts in programming.

Back

integer

Front

a whole number

Back

=>

Front

assigns a key to a hash value

Back

local variable

Front

variable that can be used only where it is defined within an application

Back

Section 3

(1 card)

library

Front

a module of classes and or functions

Back