Thursday, July 27, 2017

Language: Ruby.......


Script extension is .rb
Used online IDE http://www.tutorialspoint.com/execute_ruby_online.php
--------------------------------
# Hello World
puts "Hello World!";
Hello World!
# The Hello Class
class Hello

   def initialize( name )
      @name = name.capitalize
   end

   def salute
      puts "Hello #{@name}!"
   end
end

# Create a new object
h = Hello.new("Ruby")

# Output "Hello Ruby!"
h.salute
Hello Ruby! 
--------------------------------

No comments:

Post a Comment

Laboratory tools and reagents (Micro-pipettes)...

Micro-pipettes are essential tools of R & D labs, and integral part of Good Laboratory Practices (GLPs) Micro-pipetting methods include ...