Download three141 gem from the Project Page at RubyForge or install the gem with the command
gem install three141
Done, here is an example code:
require 'three141'
pi = Three141.new
pi.digits(2)
=> ["3", "F", "6", "A", "8", "8", "8", "5", "A", "3", "0"]
That’s all.