2012-05-11 57 views

回答

4

你基本上拿你想要測試的代碼示例,一次輸入IRB一行。例如,如果我想測試從https://github.com/genadinik/linkedin示例代碼:

$ irb 
1.9.2p290 :001 > require 'rubygems' 
=> false 
1.9.2p290 :002 > require 'linkedin' 
=> true 
1.9.2p290 :003 > client = LinkedIn::Client.new('your_consumer_key', 'your_consumer_secret') 
=> #<LinkedIn::Client:0x007fd48b09fdc8 @consumer_token="your_consumer_key",@consumer_secret="your_consumer_secret", @consumer_options={}> 

等。以=開頭的輸入後面的行代表輸入的返回值。希望有所幫助!

1

開始與打開命令提示和打字:

> irb 
irb> require 'linkedin' 
irb> #code from the linkedin gem readme