From: "リヴェリエ" Date: 2009-12-11T16:10:57+09:00 Subject: Re: syntax issue --001636ed68354a0f71047a6e9666 Content-Type: text/plain; charset=UTF-8 On Fri, Dec 11, 2009 at 2:07 AM, Sig Dx wrote: > Hello guys, > I have hard time using Prawn (PDF library). > > I need to add to number_pages the font size > > [code] > def number_pages(string, position) > page_count.times do |i| > go_to_page(i) > str = string.gsub("","#{i+1}").gsub("","#{page_count}") > text str, :at => position > end > end > [/code] > > > so I tried number_pages(" / ", [0, 0]), :size => 10 but > i get syntax error, unexpected ',', expecting kEND > > > However text "str", :at => [0, 0], :size => 10 works fine. > > > > Can anyone please let me know the difference between the 2 lines above? > > Thanks, I appreciate your help. > > > Sig > -- > Posted via http://www.ruby-forum.com/. > > the difference is the ":at => [0,0]" so i think i should be number_pages(" / ",:at => [0, 0], :size => 10) the first argument is " / ", the second argument is { :at => [0, 0], :size => 10} --001636ed68354a0f71047a6e9666--