我有一個字符串 $text =<<<HTML
<div align="center"><center><img src='http://ecx.images-amazon.com/images/I/41KZa6thzcL._SS500_.jpg' alt="The Birthday of the World: And Other Stories"/></center><br/>
thanks
下面的代碼: class Something
attr_accessor :x
def initialize(x)
@x = x
end
def get_x
x
end
end
something = Something.new(5)
something.get_x # => 5
爲什麼解釋返回5,如果x只是在g
簡單的問題;所以在我的Capistrano的腳本deploy.rb看起來像這樣,在那裏我可以使用捕獲功能輕鬆: namespace :mycompany do
def some_function()
mylog = capture("some_command")
end
desc <<-DESC
some task description