milardovich has quit [Remote host closed the connection]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
comet23 has quit [Quit: Beware of programmers who carry screwdrivers.]
sgen has quit [Quit: Leaving]
dionysus69 has quit [Ping timeout: 248 seconds]
cahoots has quit [Ping timeout: 240 seconds]
gusrub has quit []
kculpis has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
marr has quit [Ping timeout: 240 seconds]
hkdsun has joined #ruby
br0d1n has quit [Quit: Leaving]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
vondruch has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
vondruch has joined #ruby
ketan has joined #ruby
Bhootrk_ has joined #ruby
Bhootrk_ has quit [Max SendQ exceeded]
Nitza has joined #ruby
ketan has quit [Ping timeout: 240 seconds]
baweaver is now known as baweaver_away
knight33 has joined #ruby
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
Rr4sT has joined #ruby
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baweaver_away is now known as baweaver
t-recx has quit [Quit: t-recx]
mim1k has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
sleepee has joined #ruby
choke has joined #ruby
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
gizmore|2 has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gizmore has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
bkxd_ has joined #ruby
vondruch has quit [Remote host closed the connection]
duderonomy has joined #ruby
boombox_ has joined #ruby
vondruch has joined #ruby
xall has joined #ruby
oscurochu has joined #ruby
vondruch has quit [Remote host closed the connection]
oscurochu has left #ruby [#ruby]
vondruch has joined #ruby
dviola has quit [Quit: WeeChat 1.9]
d^sh has quit [Ping timeout: 260 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
d^sh has joined #ruby
br0d1n has joined #ruby
br0d1n has quit [Client Quit]
br0d1n has joined #ruby
_whitelogger has joined #ruby
bronson has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
boombox_ has quit [Remote host closed the connection]
vondruch has quit [Remote host closed the connection]
mim1k has joined #ruby
vondruch has joined #ruby
gnufied has quit [Quit: Leaving]
mim1k has quit [Ping timeout: 260 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
sleepee has quit [Ping timeout: 260 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
tacoboy has quit [Ping timeout: 255 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
ascarter_ has joined #ruby
GinoMan2440 has joined #ruby
ascarter_ has quit [Ping timeout: 240 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
knight33 has joined #ruby
Nitza has quit [Ping timeout: 248 seconds]
AnoHito_ has joined #ruby
sspreitzer has quit [Ping timeout: 276 seconds]
TvL2386_ has joined #ruby
TvL2386 has quit [Ping timeout: 255 seconds]
AnoHito_ has quit [Client Quit]
jenrzzz has quit [Ping timeout: 268 seconds]
sspreitz has joined #ruby
AnoHito has quit [Ping timeout: 248 seconds]
mokiwis has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
__Yiota has joined #ruby
ketan has joined #ruby
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
Joufflu_Fail has joined #ruby
xall has quit [Ping timeout: 268 seconds]
MarkBilk_ has quit [Ping timeout: 258 seconds]
ketan has quit [Ping timeout: 268 seconds]
Joufflu has quit [Ping timeout: 276 seconds]
juanca_ has joined #ruby
AnoHito has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
mokiwis has quit [Quit: See ya!]
mim1k has joined #ruby
Rr4sT has quit [Quit: Connection closed for inactivity]
charliesome has joined #ruby
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
nicesignal has joined #ruby
rhyselsmore has joined #ruby
meadmoon has joined #ruby
nobitanobi has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AnoHito_ has joined #ruby
AnoHito has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 260 seconds]
gix has joined #ruby
Joufflu_Fail has quit [Read error: Connection reset by peer]
_whitelogger has joined #ruby
hutch34 has joined #ruby
knight33 has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enodata has quit [Quit: enodata]
__Yiota has joined #ruby
hutch34 has quit [Ping timeout: 276 seconds]
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
meadmoon has quit [Quit: I am functioning within established parameters.]
lpio has joined #ruby
mim1k has joined #ruby
arescorpio has joined #ruby
AnoHito_ has quit [Read error: Connection reset by peer]
vqrs has quit [Ping timeout: 240 seconds]
<lpio>
I have a basic question about hashes. I'm using Ruby 2.3.1. If I create a new hash a = {font_size: 10, font_family: "Arial"} a[:font_size] returns 10 but a["font_size"] returns nil. Does the second case not get converted to a symbol as well?
AnoHito_ has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
brent__ has joined #ruby
AnoHito_ has quit [Read error: Connection reset by peer]
AnoHito_ has joined #ruby
brent__ has quit [Remote host closed the connection]
Periapsis has joined #ruby
bronson has joined #ruby
Nitza has joined #ruby
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
nobitanobi has quit [Remote host closed the connection]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
hutch34 has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
br0d1n has quit [Quit: Leaving]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
hutch34 has quit [Ping timeout: 276 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
Renich has quit [Quit: Renich]
brent__ has joined #ruby
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
milardovich has joined #ruby
Periapsis has quit [Ping timeout: 240 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
bkxd_ has quit [Ping timeout: 276 seconds]
bkxd has quit [Ping timeout: 276 seconds]
Periapsis has joined #ruby
vondruch has quit [Remote host closed the connection]
bkxd has joined #ruby
vondruch has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd_ has joined #ruby
ketan has joined #ruby
Periapsis has quit [Ping timeout: 260 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
xall has joined #ruby
ketan has quit [Ping timeout: 248 seconds]
geschopf has joined #ruby
bronson has joined #ruby
MarkBilk has joined #ruby
Bock has joined #ruby
brent__ has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
juanca_ has quit [Remote host closed the connection]
juanca_ has joined #ruby
Doukeshi has joined #ruby
Doukeshi has quit [Remote host closed the connection]
juanca_ has quit [Ping timeout: 248 seconds]
amclain has quit [Quit: Leaving]
juanca_ has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
juanca_ has quit []
Mia has quit [Ping timeout: 240 seconds]
Doukeshi has joined #ruby
Doukeshi has quit [Remote host closed the connection]
xall has quit [Quit: xall]
bkxd has quit [Read error: Connection reset by peer]
bkxd_ has quit [Read error: Connection reset by peer]
shiranuidong has joined #ruby
shiranuidong has quit [Remote host closed the connection]
ascarter has joined #ruby
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
bkxd has joined #ruby
shiranuidong has joined #ruby
shiranuidong has quit [Remote host closed the connection]
bkxd_ has joined #ruby
ascarter has quit [Ping timeout: 240 seconds]
shiranuidong has joined #ruby
shiranuidong has quit [Max SendQ exceeded]
shiranuidong has joined #ruby
shiranuidong has quit [Max SendQ exceeded]
ltem has joined #ruby
shiranuidong has joined #ruby
shiranuidong has quit [Max SendQ exceeded]
rhyselsmore has joined #ruby
shiranuidong has joined #ruby
shiranuidong has quit [Max SendQ exceeded]
rhyselsmore has quit [Client Quit]
shiranuidong has joined #ruby
shiranuidong has quit [Max SendQ exceeded]
ltem has quit [Ping timeout: 240 seconds]
Dimik is now known as Asara
Asara is now known as Dimik
<havenwood>
lpio: A Symbol is a different thing than a String. Rails has HashWithIndifferentAccess that conflates the two.
<lpio>
@havenwood oh I see. Thanks!
<lpio>
havenwood: ^
bronson has joined #ruby
Nitza has quit [Remote host closed the connection]
Nitza has joined #ruby
mesamoo has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
<balo>
reggelt
nofxxxx has joined #ruby
dcunit3d has joined #ruby
lpio has quit []
nofxxx has quit [Ping timeout: 260 seconds]
AnoHito has joined #ruby
AnoHito_ has quit [Ping timeout: 255 seconds]
patarr has joined #ruby
Ishido has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
moei has quit [Quit: Leaving...]
jgnagy has quit [Remote host closed the connection]
ketan has joined #ruby
rohitpaulk has joined #ruby
enterprisey has joined #ruby
arescorpio has quit [Quit: Leaving.]
ketan has quit [Ping timeout: 240 seconds]
nofxxxx has quit [Quit: Leaving]
nofxx has joined #ruby
bronson has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rohitpaulk has quit [Ping timeout: 240 seconds]
yeticry has joined #ruby
yeticry_ has quit [Read error: Connection reset by peer]
rohitpaulk has joined #ruby
kculpis has quit [Ping timeout: 248 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moei has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
dionysus69 has joined #ruby
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #ruby
meshsmith has quit [Remote host closed the connection]
meshsmith has joined #ruby
meshsmith has joined #ruby
meshsmith has quit [Changing host]
Nitza has quit [Ping timeout: 240 seconds]
meshsmith has quit [Remote host closed the connection]
bronson has joined #ruby
nemesit|znc has joined #ruby
Nitza has joined #ruby
marr has joined #ruby
ur5us has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
InfinityFye has joined #ruby
djbkd has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #ruby
enterprisey has quit [Remote host closed the connection]
hutch34 has joined #ruby
belmoussaoui___ has joined #ruby
belmoussaoui_ has quit [Ping timeout: 268 seconds]
Nitza has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimalism has quit [Quit: minimalism]
hutch34 has quit [Ping timeout: 260 seconds]
ddddddd has joined #ruby
Nitza has joined #ruby
roshanavand has joined #ruby
djbkd has quit [Remote host closed the connection]
milardovich has quit [Remote host closed the connection]
stamina has joined #ruby
patarr has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
patarr has quit [Ping timeout: 276 seconds]
kent\n has quit [Quit: Quitting]
kies has joined #ruby
kent\n has joined #ruby
InfinityFye has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
rohitpaulk has quit [Ping timeout: 240 seconds]
ketan has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
ketan has quit [Ping timeout: 246 seconds]
psychicist__ has joined #ruby
bronson has joined #ruby
InfinityFye has joined #ruby
InfinityFye has quit [Read error: Connection reset by peer]
InfinityFye has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
ur5us has quit [Remote host closed the connection]
belmoussaoui has joined #ruby
belmoussaoui___ has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
bkxd_ has quit [Ping timeout: 268 seconds]
vondruch has quit [Remote host closed the connection]
ecuanaso has joined #ruby
vondruch has joined #ruby
faraco has joined #ruby
<faraco>
hi guys, what is the equivalent of Python 'if word in sentence' for Ruby?
biberu has joined #ruby
<faraco>
I know I can use regex =~, but I don't think it is good for simple string checking.
<ytti>
can you please give real example
<ytti>
maybe
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
<ytti>
sentence.split.include? word
<faraco>
for symbol in message: if symbol in LETTERS: do_something()
<ytti>
sentence.include? word
<ytti>
seems to work too
<ytti>
(i did not know that)
<faraco>
thanks
<dminuoso>
havenwood: Sadly.
ur5us has quit [Remote host closed the connection]
BlkDynmt has quit [Quit: BlkDynmt]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Nitza>
"hello worlds".include? "world" will be true. Probably best to split and check the array includes the words you want?
ascarter has joined #ruby
<Zarthus>
nitza: it is equivelent to python's "if word in sentence" though
<Nitza>
Zarthus ah yeah, that _was_ the question :)
ascarter has quit [Ping timeout: 240 seconds]
Nitza has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andrzejku has joined #ruby
faraco has quit [Quit: Leaving]
Nitza has joined #ruby
bkxd has joined #ruby
bkxd_ has joined #ruby
l0ve has joined #ruby
Silthias has joined #ruby
<l0ve>
So i have basicly 0 knowlege of Ruby and was thinking how hard it is.. What can you say about it?
Silthias1 has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
anisha has joined #ruby
* apeiros
highly doubts that python actually does check whether a *word* exists in a string with `if word in sentence`
bronson has quit [Ping timeout: 240 seconds]
<apeiros>
I assume that's either "substring in string" or "item in array" (or both). both equivalent to subject.include?(element) in ruby (for `element in subject`)
tvw has joined #ruby
* dminuoso
pokes apeiros with a pure function
<dminuoso>
Take that!
<dminuoso>
Can't sue me, it had no side effect on you.
* apeiros
spoils it so it becomes an impure function
<dminuoso>
:(
* apeiros
goes back to defeat ganon
<dminuoso>
Sounds like Zelda
<apeiros>
no, that poor lady has been trapped with ganon for 100 years without defeating him (it?)
tvw has quit []
GodFather_ has quit [Ping timeout: 260 seconds]
Silthias has quit [Ping timeout: 240 seconds]
nowhere_man has joined #ruby
lxsameer has joined #ruby
belmoussaoui has quit [Ping timeout: 240 seconds]
belmoussaoui has joined #ruby
anisha has quit [Read error: Connection reset by peer]
dcunit3d has quit [Ping timeout: 260 seconds]
anisha has joined #ruby
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
belmoussaoui has quit [Remote host closed the connection]
belmoussaoui has joined #ruby
sepp2k has joined #ruby
patarr has joined #ruby
<Zarthus>
apeiros: it's basically strpos
<Zarthus>
and yes, it also works for arrays
davic has joined #ruby
dionysus69 has joined #ruby
xall has joined #ruby
_whitelogger has joined #ruby
uZiel has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
nitza_ has joined #ruby
Silthias has joined #ruby
roshanavand has quit [Ping timeout: 268 seconds]
l0ve_ has joined #ruby
rohitpaulk has joined #ruby
workmad3 has joined #ruby
ketan has joined #ruby
l0ve has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
ketan has quit [Ping timeout: 240 seconds]
<rapha>
Grah.
geschopf has quit [Ping timeout: 255 seconds]
<rapha>
Is there any way to select all those tags with Nokogiri that do not contain any further tags? My best try so far is doc.css('*').xpath('text()') {|n| n.parent}, but when I try n.parent.content.strip! inside of that (which is the point of the exercise) nothing happens.
bronson has joined #ruby
<rapha>
But n.content='Meh' works. Strange.
<rapha>
Albeit mildly entertaining to have a big and complicated HTML document that reads "Meh Meh Meh" all the way.
Ishido has quit [Ping timeout: 255 seconds]
bronson has quit [Ping timeout: 276 seconds]
dcunit3d has joined #ruby
anisha has joined #ruby
MarkBilk has quit [Ping timeout: 246 seconds]
armyriad has joined #ruby
<rapha>
Okay, better question: how do I find out what the things I get from "blah".bytes actually are? I.e. what their Unicode code is? (A space character is 32 which is not the same as 0020)
anisha has quit [Read error: Connection reset by peer]
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
nitza_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
l0ve_ has quit [Read error: Connection reset by peer]
anisha has joined #ruby
anisha has quit [Read error: Connection reset by peer]
Nitza has quit [Ping timeout: 240 seconds]
anisha has joined #ruby
l0ve_ has joined #ruby
<elomatreb>
rapha: If you want the codepoints, make sure your String has the correct encoding and call #codepoints
anisha has quit [Read error: Connection reset by peer]
anisha has joined #ruby
<elomatreb>
And 0020 is the same as 32, it's a hexadecimal number
sepp2k has quit [Ping timeout: 248 seconds]
<rapha>
Oh. So easy!
* rapha
huggles #codepoints and elomatreb
anisha has quit [Read error: Connection reset by peer]
anisha has joined #ruby
workmad3 has joined #ruby
ketan has joined #ruby
<rapha>
Okay, so the problem is with Nokogiri. It changes a <p>1</p> into a <p> 1</p> for some reason.
stamina has quit [Ping timeout: 276 seconds]
anisha_ has joined #ruby
anisha has quit [Ping timeout: 260 seconds]
anisha_ has quit [Read error: Connection reset by peer]
anisha_ has joined #ruby
<dminuoso>
14:06:19 elomatreb | [11:52:55] And 0020 is the same as 32, it's a hexadecimal number
<dminuoso>
elomatreb: ^- I like you to look at that message.
<dminuoso>
And ponder about it.
<dminuoso>
If shooting people was legal, I might try it on you.
ketan has quit [Remote host closed the connection]
sepp2k has joined #ruby
ketan has joined #ruby
<rapha>
But s/he is right dminuoso: 2*16+0=32 - ain't it so?
<dminuoso>
rapha: If you write 020 it _means_ octal.
anisha_ has quit [Ping timeout: 246 seconds]
<matthewd>
dminuoso: And in context, 0020 is pretty clearly a [hexadecimal] unicode codepoint
<rapha>
dminuoso: but the writing was "0020", not "020"
<dminuoso>
matthewd: Uhh?
<dminuoso>
matthewd: Mmm.
anisha_ has joined #ruby
<matthewd>
"0020 is octal" is just as contextual; claim it's equal to 32 to a person off the street and see how far you get.
<dminuoso>
matthewd: I would say its conventional to write U+0020 then but *shrugs*
<matthewd>
err, 16, not 32.. but you know what I meant ;)
<dminuoso>
Yeah
<dminuoso>
matthewd: Still. I feel like calling it "0020" is making up an ambigious notation.
<dminuoso>
In particular because in Ruby and some other languages a mere "0" prefix means octal
anisha_ has quit [Client Quit]
ur5us has joined #ruby
<matthewd>
Agree, but elomatreb was quoting the value rapha gave. So the sentence said "0020 is" but actually had an implied "the 0020 you're seeing is"
<dminuoso>
Ah. I missed that part.
<dminuoso>
Should really get this damn znc fixed
<rapha>
>> "For breakfast: #{['scrambled eggs, grilled tomatoes and rye bread', 'musli with oranges, raisins and warm milk', 'rye bread with various spreads and cheeses'][rand(0..2)]}"
<ruby[bot]>
rapha: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<rapha>
Damn. Now I still don't know.
<Papierkorb>
>> ['scrambled eggs, grilled tomatoes and rye bread', 'musli with oranges, raisins and warm milk', 'rye bread with various spreads and cheeses'].sample(2)
<ruby[bot]>
Papierkorb: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
anisha_ has joined #ruby
<rapha>
Seems the bot is different from what we're used to.
<rapha>
>> "For breakfast: #{['scrambled eggs, grilled tomatoes and rye bread', 'musli with oranges, raisins and warm milk', 'rye bread with various spreads and cheeses'].values_at(rand(0..2))}"
<ruby[bot]>
rapha: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<rapha>
Okay, that's strange.
<matthewd>
That's the bot having an internal error, not complaining about your supplied code
<rapha>
Oh.
<rapha>
Did I break it? :(
<rapha>
Anyways, the laptop decided for the first choice.
ur5us has quit [Ping timeout: 240 seconds]
<matthewd>
No, it just breaks sometimes -- it relies on a separate remote service to do the actual evaluating
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
bronson has joined #ruby
l0ve_ has quit [Quit: WeeChat 1.8]
belmoussaoui has quit [Ping timeout: 240 seconds]
belmoussaoui has joined #ruby
stamina has joined #ruby
<rapha>
I see. Btw, Papierkorb, your version would have to be .sample(1)[0]
<Papierkorb>
mis-interpreted your code. In you case, calling #sample without any arguments will return an element without an array
bronson has quit [Ping timeout: 276 seconds]
<rapha>
Oh, cool, thank you! :)
anisha_ has quit [Read error: Connection reset by peer]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
anisha_ has joined #ruby
anisha_ has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
kanye_vest has joined #ruby
vondruch has quit [Remote host closed the connection]
boombox_ has quit [Remote host closed the connection]
<elomatreb>
adavia: If you can trust the indices in the individual hashes you could use ...[:questions].inject({}, :merge) to merge all the Hashes into one
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
<elomatreb>
After that you could use transform_values to remove that array from the title key: https://eval.in/829694
GinoMan2440 has quit [Quit: Leaving]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
andrzejku has joined #ruby
xrlk has quit [Quit: HEIL HITLER]
__Yiota has joined #ruby
bkxd has joined #ruby
bkxd_ has joined #ruby
cdg has joined #ruby
bkxd_ has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 260 seconds]
quobo has joined #ruby
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
bronson has quit [Remote host closed the connection]
Mia has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
psychicist__ has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cseder has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
akkad has quit [Excess Flood]
adavia has quit [Ping timeout: 260 seconds]
akkad has joined #ruby
bronson has joined #ruby
lacuna has joined #ruby
cdg has quit [Remote host closed the connection]
antgel_ has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
hutch34 has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
dcunit3d has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
n0vo has joined #ruby
<n0vo>
IS anyone here familiar with Cassandra in ruby?
TwoPiece has quit [Remote host closed the connection]
<n0vo>
I'm attempting to create a simple ruby interface to interact with a keyspace from the command line, and I'm trying to simply describe the tables of a specific keyspace.
<n0vo>
Is there a command to use a keyspace, so that every subsequent CQL query will be run in the context of that particular keyspace?
<n0vo>
cluster.connect('keyspace') is the only thing I've found but it doesn't seem to have any effect of subsequent commands
vondruch has quit [Remote host closed the connection]
<n0vo>
Alternatively, does " `get': line 1:0 no viable alternative at input 'DESCRIBE'" pertain to a syntax error? Because I can't imagine there'd be too many gotchas running "DESCRIBE tables"
<n0vo>
Seems pretty straightforward to me
vondruch has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]