Below, we find sample code which uses block to return the values of the Fibonacci number Series. def fibMax(max) a1, a2 =1,1 # variables that are assigned parallel values while a1
Author Archives: Avatar
Constructing Blocks
Blocks are code contained within the braces that if used with the last post’s example would be associated with the call to the function threeTimes. Within the defined method a call for yield is called three times in a row wherein each time a call to the block is sent the greeting is displayed which [...]
Container Creation
To initialize a container we will do the same steps showing code to support the things that have to be done. We create a table where we can add elements to the contents delete objects from either the beginning or the last entries and display an entry using the index or content on the index. [...]
Ruby on Rails – Features
The rails part is the framework/platform where Ruby, the base programming language was standardized on in hopes of making it more standardized. Ruby has the following features and additions which makes it a favorable development tool to add to already existing applications. First, it uses familiar syntax so you do not get too confused, next [...]