我有一个字符串 $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