Category Archives: Ruby

Ruby progaming basic advanced

This article summary “Ruby progaming basic advanced to find statement, keywords in ruby fast,…Ruby language is general purpose so you can do web, app (like automation, network,..)..
Separate string with space:

Operation with array:

Working with file:
Basic in reading file watch here
Read excel file
Debug trong Ruby với inspect
Match and get values that found out:

Check pattern is matched or not:

Replace string with Regular Expression
Convert string to uppercase, lowercase:

Add sign \ to single quote:

result like  Qin\’s, it’s useful when process mysql in Ruby

Get current directory path:

Get information of operation system

Coding conventions:
https://www.mediawiki.org/wiki/Manual:Coding_conventions/Ruby
http://www.slideshare.net/davidpaluy/ruby-on-rails-coding-conventions-standards-and-best-practices?from_action=save
https://github.com/justin808/ruby

Data type hash:

Check data type is hash or not

Check key exist in hash or not

Overview  “Ruby progaming basic advanced” we know something about Ruby, maybe you like it and go further!

Require file with Ruby

Require file with Ruby – cách sử dụng một file khác tới file hiện hành:

Có thể sử dụng 1 trong 3 cách để gọi file vào sử dụng, cách require không cần đưa đuôi file vào, cách load thì mỗi lần phương thức được chạy nó lại nạp file, còn require thì không.