SlideShare a Scribd company logo
#1 Ruby Basic
RUBY ON RAILS
CRASH COURSE
practice
¡ Concept
¡ Setup Installation
¡ Basic Ruby
§ Variables, Constants, Arguments
§ Blocks & Iterations
§ Variable & Methods
§ Object Oriented Programming
¡ Practice Makes Perfect
Duration
120 mins
OVERVIEW
CONCEPT
Showcase :
WHY
¡  Rails is a web application development framework written in
Ruby Language.
¡  Created by : David Heinemeier Hansson
¡  Philosophy :
§  DRY (Don’t Repeat Yourself)
§  Convention Over Configuration
WHAT
¡  Ruby is simple in appearance, but is very complex inside, just
like our human body
¡  Created By : Yukihiro “Matz” Matsumoto
¡  Summary :
§  Seeing Everything as Object
§  Blocks : Truly Expensive Feature
§  Ruby and Mixins
RUBY
SETUP INSTALLATION
¡  https://tinyurl.com/ss-ruby-course
¡  Password : mario
LETS PRACTICE
¡  Requirement:
§  UNIX OS, example : Linux LTS 16.04, 14.04, MacOS
§  WINDOWS : NO.
¡  Install Ruby Version Manager
§  rvm : https://rvm.io/rvm/install
¡  Install Ruby
§  console : rvm install ruby 2.3.4
*or newer than 2.2.2
SETUP INSTALLATION
¡  Console :
> ruby –v
> irb
> puts “Hello Ruby!”
IRB (INTERACTIVE RUBY SHELL)
#1_INSTALL.SH
¡  RVM (Ruby Version Manager)
¡  Gemset (Container for ruby gems)
¡  Gems
GLOSSARY
https://github.com/bbatsov/ruby-style-guide
¡  Space : 2
¡  No Tab
¡  Method & Variable Name : snake_case
¡  Class & Module Name : CamelCase
¡  Constant : SCREAMING_SNAKE_CASE
SIMPLE STYLE GUIDE
Let’s say it again. Ruby is a genuine object-oriented language. Everything
you manipulate is an object, and the results of those manipulations are
themselves objects.
SEEING EVERYTHING AS OBJECT
#2_BASIC.RB
#2_BASIC.RB
¡  Local Variable: name fish_and_chips x_axis thx1138 _x _26
¡  Instance Variable: @name @point_1 @X @_ @plan9
¡  Class Variable: @@total @@symtab @@N @@x_pos @@SINGLE
¡  Global Variable: $debug $CUSTOMER $_ $plan9 $Global
¡  Class Name: String ActiveRecord MyClass
¡  Constant Name: FEET_PER_MILE DEBUG
NAMING CONVENTION
#2_BASIC_STRING.RB
#2_BASIC_ARRAY.RB
#2_BASIC_HASH.RB
#2_CONTROL_STRUCTURES.RB
#2_CONTROL_STRUCTURES.RB
#2_BLOCKS
#2_ITERATIONS
#2_VARIABLE.RB
#2_METHOD.RB
#2_CLASS
#2_INHER_POLIMORPHISM.RB
#2_MIXIN
PRACTICE
CREATE GEM
AUTO_3000.RB
AUTO_3000.GEMSPEC
¡  Module : Auto3000
§  Class
§  Car : @name, @rank, @gasolines
§  LuxuryCar < Car
§  RentalCar
§  Concern
§  Rankable
§  Gasoline
§  AutoNetMags
LETS HAVE FUN
TODO
PLEASE FINISH THIS GEM
@udnpico
AUTHOR

More Related Content

PDF
Ruby course-1-preview
PPTX
Introduction to JavaScript
PPTX
Codestock2018 - CSS vs JS
PDF
WebAssembly with Rust
PDF
Five ways to be a happier JavaScript developer
PDF
Unobtrusive Javascript - SD.rb 2007
PDF
Javascript fullstasck
KEY
Starting Node
Ruby course-1-preview
Introduction to JavaScript
Codestock2018 - CSS vs JS
WebAssembly with Rust
Five ways to be a happier JavaScript developer
Unobtrusive Javascript - SD.rb 2007
Javascript fullstasck
Starting Node

What's hot (20)

PDF
WebAssembly
PDF
NodeJs Intro - JavaScript Zagreb Meetup #1
PPTX
DevDay 2018 - Blazor
PDF
Full stack java script development
PDF
WebAssembly: Digging a bit deeper
PDF
Mehes Artem CV
PDF
PPTX
Real World Rails 5 Programming for Web Developers
DOCX
Untitleddocument (1)
PDF
Responsibly Architecting for the World–Wide Web
PDF
May LRUG talk
PPTX
Real World Windows 8 Apps in JavaScript
PDF
All Users Are Disabled
PPTX
Grunt understanding
PDF
Seven ways to be a happier JavaScript developer - NDC Oslo
PDF
Future Fit courses
PDF
GETTING STARTED WITH JavaScript and ReactJS
PDF
Week7 assignment c
WebAssembly
NodeJs Intro - JavaScript Zagreb Meetup #1
DevDay 2018 - Blazor
Full stack java script development
WebAssembly: Digging a bit deeper
Mehes Artem CV
Real World Rails 5 Programming for Web Developers
Untitleddocument (1)
Responsibly Architecting for the World–Wide Web
May LRUG talk
Real World Windows 8 Apps in JavaScript
All Users Are Disabled
Grunt understanding
Seven ways to be a happier JavaScript developer - NDC Oslo
Future Fit courses
GETTING STARTED WITH JavaScript and ReactJS
Week7 assignment c
Ad

Similar to Ruby course-1-practice (20)

PPTX
Ruby on rails
PDF
Pengantar Ruby on Rails
PPTX
Ruby on Rails - An overview
PDF
Ruby on Rails
PPTX
Ruby on rails
PDF
Make your app idea a reality with Ruby On Rails
PPTX
Exploring Ruby on Rails and PostgreSQL
KEY
Modern Webdevelopment With Ruby On Rails
PDF
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
PPTX
Introduction to Ruby on Rails
PDF
JRuby - Enterprise 2.0
PDF
Convention of RoR, openit 2015
PDF
FGCU Camp Talk
PDF
RoR (Ruby on Rails)
PDF
Why would a Java shop want to use Ruby?
KEY
Ruby on Rails survival guide of an aged Java developer
PDF
General Assembly Workshop: Advanced JavaScript
PDF
Front End Sadness to Happiness: The React on Rails Story
PPTX
Ruby on Rails : First Mile
PDF
Shipping NodeJS with Docker and CoreOS
Ruby on rails
Pengantar Ruby on Rails
Ruby on Rails - An overview
Ruby on Rails
Ruby on rails
Make your app idea a reality with Ruby On Rails
Exploring Ruby on Rails and PostgreSQL
Modern Webdevelopment With Ruby On Rails
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Introduction to Ruby on Rails
JRuby - Enterprise 2.0
Convention of RoR, openit 2015
FGCU Camp Talk
RoR (Ruby on Rails)
Why would a Java shop want to use Ruby?
Ruby on Rails survival guide of an aged Java developer
General Assembly Workshop: Advanced JavaScript
Front End Sadness to Happiness: The React on Rails Story
Ruby on Rails : First Mile
Shipping NodeJS with Docker and CoreOS
Ad

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Machine Learning_overview_presentation.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Approach and Philosophy of On baking technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Empathic Computing: Creating Shared Understanding
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine Learning_overview_presentation.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Unlocking AI with Model Context Protocol (MCP)
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation_ Review paper, used for researhc scholars
Agricultural_Statistics_at_a_Glance_2022_0.pdf
sap open course for s4hana steps from ECC to s4
Approach and Philosophy of On baking technology
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm

Ruby course-1-practice