我的书上写了关于嵌入文档(here documnet),但是照着它的例子并没有觉得有什么变化
例子是这样的:
sonnet = <<hamlet
O my prophetic soul! My uncle!
hamlet
sonnet = <<"hamlet"
O my prophetic soul! My uncle!
hamlet
sonnet = <<'ghost'
Pity me not, but lend the serious hearing
To what I shall unfold.
ghost
my_dir = <<`dir`
ls -l
dir
ind = <<-hello
Hello,Matz!
hello希望能讲解一下嵌入文档这个东西,以及其作用。
潜入文档比起普通的字符串(普通字符串也能建立多行呀)有什么差别呢?那个分界符号是怎么运作的?
谢谢各位了!
