#!/usr/bin/ruby

=begin
  This is a comment.
=end

# Number
i = 34
f = 3.14

# Stirng
s = "Hello"
doc = <<EOL # Here doc
This is
a text.
EOL
puts doc

# Array
a = ["A", "B", "C"]
a.each do |i|
  puts "Item = #{i}"
end

# Hash
h = {
  "A" => 1,
  "B" => 2,
  "C" => 3
}
h.each do |key,value|
  puts "#{key} => #{value}"
end

# Range
(2..5).each do |i| #inclusive
  puts "#{i}"
end
(2...5).each do |i| #exclusive
  puts "#{i}"
end

BEGIN{
  puts "Begining..."
}

END {
  puts "Finished."
}
