<rapha>
in nokogiri, when you have, say, `b=Nokogiri::XML::Builder.new;b.foobar{b.blah{b.lipsum{b.text 'Lorem ipsum'}}}` is there a way to instead say `blah_node=b.blah{...}` and then `puts blah_node.to_s` to get something like "<blah><lipsum>Lorem ipsum</lipsum></blah>"?
<rapha>
(asking because, yes, Node#to_s exists, but alas, it's an empty string)
<rapha>
ah, that's a NodeBuilder object, not a Node object.
gggp has joined #ruby
aighearach_ has quit [Remote host closed the connection]
aighearach_ has joined #ruby
ur5us has joined #ruby
MalkbabY has quit [Remote host closed the connection]
<rapha>
okay, figured it out. it's a little fucked up but it works.
<rapha>
e.g. Nokogiri::Slop(b.to_xml).xpath('//foobar/blah').last.to_xml({encoding:'UTF-8'})
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
hololeap has joined #ruby
noa has quit [Quit: Konversation terminated!]
noa has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
swaggboi has joined #ruby
swaggboi has quit [Quit: C-x C-c]
bit4bit has joined #ruby
roadie has joined #ruby
swaggboi has joined #ruby
gggp has quit [Ping timeout: 252 seconds]
ule_ has quit [Changing host]
ule_ has joined #ruby
ule_ is now known as ule
roadie has quit [Ping timeout: 240 seconds]
dviola has quit [Ping timeout: 252 seconds]
rapha has left #ruby [WeeChat 2.3]
rapha has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
<rapha>
"peter is a jolly fellow, and my, clarice and him sure are a fit so mellow".chars[12] ... and now let's get the word at that position plus the following one o_O
<adam12>
?
roadie has joined #ruby
<rapha>
adam12: index 12 of that would be the first "o", so the output should be "jolly fellow"
<adam12>
rapha: Oh I see.
<rapha>
but my brain has just started smoking and there's a smell of burned wood, too. so i'll stop here and continue this tomorrow.
xall has joined #ruby
bit4bit has quit [Ping timeout: 240 seconds]
<adam12>
>> "peter is a jolly fellow, and my, clarice and him sure are a fit so mellow".split(" ").each_cons(2).each_with_object(0) { |(one, two), pos| pos += one.length; break "#{one} #{two}" if (pos..(pos + two.length)).cover?(12) }
<adam12>
fdan: Install bundler 1.17.3 first. Before `bundle install`, do `gem install bundler -v 1.17.3`
<fdan>
ok sure, i have initiated the build
<fdan>
the same error... adam12
bit4bit has joined #ruby
fdan has quit [Ping timeout: 246 seconds]
MalkbabY has joined #ruby
MalkbabY has quit [Remote host closed the connection]
bandithijo has joined #ruby
elf_fortrez has quit [Quit: Client closed]
jpw has quit [Remote host closed the connection]
_ht has quit [Remote host closed the connection]
lunarkitty has joined #ruby
roadie has joined #ruby
bandithijo has quit [Ping timeout: 240 seconds]
Furai has quit [Quit: WeeChat 3.2]
roadie has quit [Ping timeout: 250 seconds]
Furai has joined #ruby
dviola has joined #ruby
roadie has joined #ruby
elf_fortrez has joined #ruby
<rapha>
adam12: i'm still picking that code of yours apart. #each_cons was cool, the the idea with using #each_with_object still has me buzzled and in combination with the rest it's more puzzle-worthy than any Valve game ever.
<rapha>
er. okay. english borken. good night y'all!
roadie has quit [Ping timeout: 240 seconds]
kiki_lamb has quit [Quit: Lost terminal]
brw has quit [Remote host closed the connection]
benjaminoakes has joined #ruby
brw has joined #ruby
roadie has joined #ruby
fredlinhares has joined #ruby
fredlinhares has quit [Quit: WeeChat 2.8]
roadie has quit [Ping timeout: 240 seconds]
fredlinhares has joined #ruby
belak51 is now known as belak
benjaminoakes has quit [Quit: Client closed]
roadie has joined #ruby
fredlinhares has quit [Quit: WeeChat 2.8]
fredlinhares has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
bit4bit has quit [Quit: Leaving]
roadie has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
MalkbabY has quit [Remote host closed the connection]