Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Posts about Ruby

Ruby condition judgment

May 12, 2021 07:00 0 Comment Ruby

Ruby Judgment, Ruby Judgment, Ruby if... Else statement, Grammar, Try it out . . ., The above example output results:, Ruby if modifier, Grammar, Instance, Ruby unless statement, Grammar, Instance, Ruby unless modifier, Grammar, Instance, Ruby case statement, Grammar, Instance, Ruby, Judgment, Ruby provides conditional structures that are common in other modern languages., Here, we'll explain all the conditional statements an

Ruby Range

May 12, 2021 07:00 0 Comment Ruby

Ruby Range, Ruby Range, As the range of the sequence, The range as a condition, As the range of intervals, Ruby, Range, Range is everywhere: January to December, 0 to 9, and so on., Ruby supports scope and allows us to use scope in different ways:, As the r

Ruby Date and Time

May 12, 2021 07:00 0 Comment Ruby

Ruby Date and Time, Ruby Date and Time, Create the current date and time, Instance, Get the Date and Time component, Time.utc, Time.gm, and Time.local functions, Time zone and daylight saving time, Format the time and date, Time format instructions, Time algorithm, Ruby Date and, Time, The Time, class is used in Ruby to represent dates and times. I, t is based on the system date and time provided by the operating

Ruby Hash

May 12, 2021 07:00 0 Comment Ruby

Ruby Hash, Ruby Hash, Create a hash, Hash built-in methods, Ruby, Hash, Hash is a collection of key-value pairs such as "employee" and "salary"., The hashed index is done by any key of any object type, not by a

Ruby Array

May 12, 2021 07:00 0 Comment Ruby

Ruby Array, Ruby Array, Create an array, Array built-in method, Array pack instruction, Instance, Ruby, Array, Ruby arrays are an ordered, integer index of any object., Each element in the array is related to an index and can be obtained through th

Ruby String

May 12, 2021 07:00 0 Comment Ruby

Ruby string, Ruby string, Escape characters, Character encoding, String built-in methods, String unpack instruction, Instance, Ruby, string, The String object in Ruby stores and manipulates any sequence of one or more bytes, usually representing characters that represent human

Ruby Module

May 12, 2021 07:00 0 Comment Ruby

Ruby Module, Ruby Module, Instance, Ruby require statement, Grammar, Instance, Ruby include statement, Grammar, Instance, Mixins in Ruby, Ruby, Module, Module is a way to combine methods, classes, and constants., Modules offer you two main benefits., The module provides a, namespace, and

Ruby block

May 12, 2021 07:00 0 Comment Ruby

Ruby block, Ruby block, Grammar, Yield statement, Blocks and methods, BEGIN and END blocks, Ruby, block, You already know how Ruby defines methods and how you call them., Similarly, Ruby has a block concept., Blocks are made up of a lot of co

Ruby method

May 12, 2021 07:00 0 Comment Ruby

Ruby method, Ruby method, Grammar, Instance, Return the value from the method, Ruby return statement, Grammar, Instance, Variable number of parameters, Class method, Ruby alias statement, Grammar, Instance, Ruby undef statement, Grammar, Instance, Ruby, method, The Ruby method is similar to functions in other programming languages., The Ruby method is used to bundle one or more duplicate stateme

Ruby loop

May 12, 2021 07:00 0 Comment Ruby

Ruby Loop, Ruby Loop, Ruby while statement, Ruby while modifier, Ruby until statement, Ruby until modifier, Ruby for statement, Ruby break statement, Ruby next statement, Ruby redo statement, Ruby retry statement, Ruby, Loop, Loops in Ruby are used to execute the same block of code several times., This section details all the circular statements supported by Rub

Ruby iterator

May 12, 2021 08:00 0 Comment Ruby

Ruby iterator, Ruby iterator, Ruby each iterator, Grammar, Instance, Ruby collect iterator, Grammar, Instance, Ruby, iterator, An iterator is, a method supported, by a collection. A, n object that stores a set of data members is called a collection., In Ruby, a

The input and output of the Ruby file

May 12, 2021 08:00 0 Comment Ruby

The input and output of the Ruby file, The input and output of the Ruby file, Puts statement, Instance, Gets statement, Instance, Putc statement, Instance, The print statement, Instance, Open and close files, File.new method, File.open method, Read and write files, The sysread method, syswrite method, each_byte method, IO.readlines method, IO.foreach method, Rename and delete files, File mode and ownership, File query, The directory in Ruby, Browse the catalog, Create a directory, Delete the directory, Create a file and a temporary directory, Built-in functions, The input, and output of the Ruby file, Ruby provides a complete set of I/O-related methods, implemented in the Kernel module., All I/O methods are de

Ruby File classes and methods

May 12, 2021 08:00 0 Comment Ruby

Ruby File classes and methods, Ruby File classes and methods, Class method, The instance method, Ruby, File classes and methods, File, represents a, stdio, object connected to a normal file., open returns an instance of the class for a normal file

Ruby Dir classes and methods

May 12, 2021 08:00 0 Comment Ruby

Ruby Dir classes and methods, Ruby Dir classes and methods, Class method, The instance method, Ruby, Dir classes and methods, Dir is, a directory stream that represents the name of the file used to give the directory in the operating system., Th

Ruby exception

May 12, 2021 08:00 0 Comment Ruby

Ruby exception, Ruby exception, Grammar, Instance, Use the retry statement, Grammar, Instance, Use the raise statement, Grammar, Instance, Use the ensure statement, Grammar, Instance, Use the else statement, Grammar, Instance, Catch and Throw, Grammar, Instance, Class Exception, Ruby, exception, Exceptions and execution are always linked., If you open a file that doesn't exist and don't handle it properly, your program is cons