Vocabulary

iXperience Vocabulary

Vocab beginning with a period are methods (i.e. .chomp) - API: Application Programming Interface Read more - Arguments: An argument is like a parameter that the method can use or manipulate during evaluation of the code block. Some methods require an argument or multiple arguments to be passed in, otherwise they will throw an error - Arity: The number of arguments a method expects - Array: A list, or collection, of elements stored inside of brackets [] and separated by commas (i.e., [1,2,3,"string",[1,2], nil]) - Assignment: Pointing a variable to an object (string, integer, float, etc.) using '=' - attr_accessor: - Attributes: - Block: Specially formatted Ruby code that is passed into methods that can take a block as an argument - CSS: Cascading Style Sheets Read more - .chomp: Removes the new line (return or enter) character from a string (i.e., removes \n from the end of a string) - .class: A method to see what class/type an object is - Class Method: A method that can be called on the class itself (i.e., ClassName.instance_variables) - Classes: Are the types of a given object. They determine what kinds of methods it has (i.e. the species) - Collection: A list of items, called elements, stored in an array or hash - Comparator: Comparing two objects with == or => etc. - Control Flow: if, elsif, else, unless - Data types - String - Boolean - Numbers - Integer - Float - Array - Hash - Symbol - .delete: A method for deleting an element from an array or hash - .downcase: A method that converts a string's characters to all lowercase (i.e., "STRING".downcase would return "string") - DRY: Don't Repeat Yourself - Duck typing: - .each: An array method that runs a block of code on each element in the collection, and returns the original array - .each_with_index: is just like .each except that it also gives you the index of the element along with the element - Early Return: Sometimes you may want to exit a method early (i.e., based on user response). You can do this using return - Element (Array): Items in an array are called elements - Element (Hash): Key/value pair - Encapsulation: The packing of data and functions into a single component (i.e., methods inside of a class) - Endpoints: - Enumeration: An iteration where the condition is simply doing something to each item of a collection - Expression: Expressions are constructed from operands and operators Read more - Fixnum: Class for storing and manipulating integers/numbers - .find: A class method for finding a specific instance of that method using an id (i.e., Cars.find(1)) - Float: Real number - .gets: Get string. Used to get user input as a string. (i.e., response = gets.chomp see .chomp above) - **Git: A source control manager (SCM) - **GitHub: An online service for backing up, collaborating on, and sharing your local code (that you track with git) - **Global Method: - **Hash: Stores a list of data like an array, but it uses an object key instead of a numeric index. A hash maps a set of unique keys to values (i.e., {"key => "value"}) - **HTML: HyperText Markup Language Read more - **Implicit Return: Ruby methods automatically return a value without having to be told to (i.e., you don't need to use return 1 + 2, you can just have 1 + 2) - *.include?: A method that checks to see if a string or array includes a certain object, (i.e., if x = ["hello", "good-bye"] then x.include?("hello") will return true) - **Index: Elements locations in an array are indexed, starting at 0 for the first and incrementing by one until reaching the end of the array - Inheritance: A relation between two classes (i.e., cats are mammals and mammals are animals, therefore they share behavior aka methods) - Instances: Are incarnations of objects of a specified class - Instance Method: Methods that can be called on an instance of a class - Instance Scope (of an object): Everything that lives inside of an object during its lifespan (i.e., instance variables) - Instance Variables: Begin with an at sign (@) and can be referenced only within class methods. They differ from local variables in that they don't exist within any particular scope. Instead, a similar variable table is stored for each instance of a class. Instance variables live within a class instance, so as long as that instance stays alive, so will the instance variables. - .instance_variables: A class method for seeing all the instance variables related to a particular class - Instantiate: The act of creating a new instance of a class (i.e., dog = Animal.new) - Integer: Whole number - Invoke or Call (a method): Running a method - .is_a?: - Iteration: Running code in a loop until a particular condition is met - JSON: JavaScript Object Notation - .length: A method that will return the length of a string, array, or hash as an integer (i.e., if array = [1,2,3] then array.length will return 3) - List: A collection of items, referred to as elements, stored inside of an array or hash - Loop: A set of code that will repeat indefinitely - Main: "Top level" scope in Ruby - .map: An array method that runs a block of code on each item in the list, and stores the return values of each block into a new array - .max: - Meta Data: Data about data - Methods: Are functions/procedures you can call on instances of objects - Method Signature: Method name and argument(s) (i.e., shout_hello or shout(message) or greet_students(word, count) - Negative Indices: You can access elements from an array in reverse order (starting at the end) by using negative numbers, beginning at -1 - Nil: Ruby's way of saying there's nothing there - Objects: Are the basic building blocks of Ruby that everything is built off of - Operators: +, - , /, %, * - Operand: An operand is one of the inputs (arguments) of an operator - Parent Class: The base (or superclass) that a child class inherits from - Pry: An interactive shell for the Ruby programming language - .push: A method that adds an element to the end of an array (i.e., if array = [] then array.push("Hello") would return ["Hello"]) - .puts: Put String. Prints a string - .reduce: An array method that takes an initial value, and runs the block of code on each item in the list, then returns the final value - REPL: Read-Evaluate-Print Loop - Repository: The folder where your code is stored and tracked with git - .respond_to: - REST: Representational State Transfer Read more - Return Values: The last evaluated statement in a method is always returned when the method is invoked - Ruby: - Self: Self: Refers to the object in the current scope (in a class, self refers to any instance of that class) - Stage (index, cache): The safety area where your code can be staged before actually commiting it to your git repository - String Interpolation: Ruby evaluates anything inside of #{}, string interpolation must be inside of double quotes, otherwise it will be evaluated as a string literal Read more - String Literal: Any string enclosed in double or single quotes that you type manually - Symbol: An efficient way to store simple keys (i.e., :symbol) Read more - Syntactic Sugar: - Title Case: Capitalization of the first letter and every first letter of each new word in a class name, with no spaces (i.e., ArcticAnimalAquarium) - .to_f: Converts a string or integer to a float - .to_i: Converts a string or float to an integer - .to_s: Converts an integer or float to a string - .upcase: A method that returns an uppercase version of any string (i.e., "hello".upcase would return "HELLO") - Variable: Used to store data for the programmer to reuse later - Variable Scope: Determines where a variable can be called