This document provides an overview of the Ruby programming language. It introduces basic Ruby concepts like variables, data types, flow control, classes and objects. It also discusses tools and frameworks like Rails, gems, and testing. The document encourages learning Ruby and provides resources to get started, including trying an interactive tutorial and installing a development environment. It emphasizes that Ruby is fun and easy to learn.
Overview of Ruby's learning resources and events including RubyConf Taiwan and Rails Girls Taipei, focused on community gatherings.
Overview of Ruby's learning resources and events including RubyConf Taiwan and Rails Girls Taipei, focused on community gatherings.
Exploration of learning goals for Ruby, including problem solving, active ecosystem, scenarios, open-source contributions, and history.
Key releases of Ruby (2.0 and 2.1), reasons for using Ruby, and various Ruby implementations with their nuances.Introduction to Ruby Version Manager (RVM), available editors, coding style guides, and addressing performance concerns of Ruby.
Various applications of Ruby such as Rake, Rack, web application development, and multimedia processing.
Resources for installing Ruby and using Interactive Ruby (irb) for practice, along with initial setup guidance.
Usage of RubyGems for package management, commands including 'install', 'env', and 'list' for managing Ruby applications.
Different types of variables in Ruby: local, global, instance, class, virtual variables, and constants.
Logic and flow control structures including conditionals, modifiers, and case statements.
Usage of loops like 'for', 'while', 'until', along with iteration methods such as 'each' and 'each_with_index'.Introduction to Ruby's Integer, String, and Array data types, with exercises to reinforce knowledge.
Introduction to Ruby's Integer, String, and Array data types, with exercises to reinforce knowledge.
Introduction to Hash data structure and Range objects in Ruby with examples and exercises.
Defining methods, method arguments, return values, and exception handling in Ruby.
Overview of blocks, Procs, lambdas, and their differences in Ruby along with examples.
Concepts of OOP in Ruby including classes, objects, instance variables, and method conventions.
Introduction to modules, their lack of inheritance, and how mixins work in Ruby.
Usage of Bundler for managing Ruby dependencies, including Gemfile configuration and creating custom gems.
Putting Ruby testing practices into focus with examples of unit tests using Minitest.
Reference to Ruby Koans for learning Ruby through tests and encouraging developers to pursue creativity in programming.
Contact and social media information of the presenter, inviting further engagement.
Let’s Learn Ruby
Rack
it’sa specification (and implementation) of a minimal
abstract Ruby API that models HTTP.
such as Sinatra, Ruby on Rails
Rack http://rack.rubyforge.org/
Sinatra http://www.sinatrarb.com
Ruby on Rails http://rubyonrails.org/
Let’s Learn Ruby
defopen_my_file(file_name)
File.open file_name do |f|
puts f.read
end
end
begin
open_my_file("block_demo.r")
rescue => e
puts e
else
puts "it's working good!"
ensure
puts "this must be executed, no matter what"
end
Let’s Learn Ruby
require“minitest/autorun"
!
class TestMyBMI < MiniTest::Unit::TestCase
def test_my_calc_bmi_is_ok
assert_equal calc_bmi(175, 80), 26.12
end
end
!
def calc_bmi(height, weight)
bmi = ( weight / (height/100.0) ** 2 ).round(2)
end
155.
Let’s Learn Ruby
require"minitest/autorun"
describe "test my bmi calculator" do
it "should calc the correct bmi" do
calc_bmi(175, 80).must_equal 26.12
end
end
def calc_bmi(height, weight)
bmi = ( weight / (height/100.0) ** 2 ).round(2)
end