Go Back

basics

Getting to Know Ruby: Day 3

August 22, 2020
ruby
basics
conditionals
comparison

Alright time for some conditionals! But before that we need to get a few things down. true,false and nil true, false and nil are like everything else in ruby are objects that have their own classes in which they are the only objects. true and false are both native boolean values. You could set it to variables, use it for methods and what not. irb(main):001:0> true.class => TrueClass irb(main):002:0> false.


Getting to Know Ruby: Day 2

August 21, 2020
ruby
basics
file-operations
comments

Day 2 here we go! Constants Constants in ruby begin with a capital or upper case letter. Unlike some programming languages ruby allows users to change constants after declaration except it will give you a warning for it. irb(main):001:0> Constant = 78.1 => 78.1 irb(main):002:0> Constant = 54.9 (irb):2: warning: already initialized constant Constant (irb):1: warning: previous definition of Constant was here => 54.9 irb(main):003:0> puts Constant 54.


Getting to Know Ruby: Day 1

August 20, 2020
ruby
basics
hello-world
vasiables
operators
input

Ruby is an interpreted, high-level, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan. I never really thought I'd learn Ruby at any point. If you look at the market both Ruby and Rails are declining in use, JS is increasing it's market share on a daily basis, if I wanted a scripting language I had python which to be honest has more users and market share than Ruby.