Robtop__ has quit [Read error: Connection reset by peer]
agit0 has quit [Quit: zzzZZZ….]
ace05 has quit [Ping timeout: 260 seconds]
fullofca_ has quit [Remote host closed the connection]
Robtop__ has joined #ruby
fullofcaffeine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
lucas has joined #ruby
fullofcaffeine has joined #ruby
gusrub has joined #ruby
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
Dimik has quit [Ping timeout: 256 seconds]
Devalo has joined #ruby
bturker has joined #ruby
jackjackdripper has joined #ruby
gusrub has quit [Ping timeout: 260 seconds]
Devalo has quit [Ping timeout: 250 seconds]
modin has quit [Ping timeout: 246 seconds]
bturker has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
xall has joined #ruby
interki has joined #ruby
tomphp has joined #ruby
djbkd has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
djbkd2 has quit [Ping timeout: 260 seconds]
modin has joined #ruby
ledestin has joined #ruby
Ropeney has joined #ruby
yqt has joined #ruby
harai has quit [Ping timeout: 245 seconds]
jackjackdripper has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
yardenbar has joined #ruby
djbkd has joined #ruby
jcao219 has quit [Ping timeout: 265 seconds]
interki has quit [Quit: Going offline, see ya! (www.adiirc.com)]
fullofcaffeine has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tempesta has joined #ruby
airstream66 has joined #ruby
elenatanasoiu has joined #ruby
claudiuinberlin has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ichkv has joined #ruby
pawnbox_ has joined #ruby
elenatanasoiu has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 256 seconds]
Nahra has joined #ruby
agent_white has quit [Ping timeout: 260 seconds]
elenatanasoiu has joined #ruby
djbkd has quit []
quazimodo has quit [Ping timeout: 245 seconds]
arescorpio has joined #ruby
Prawnzy has joined #ruby
ichkv has quit [Read error: Connection reset by peer]
mluts has joined #ruby
agit0 has joined #ruby
ace05 has joined #ruby
peteykun has quit [Quit: Leaving]
ace05 has quit [Remote host closed the connection]
ace05 has joined #ruby
kies has quit [Ping timeout: 256 seconds]
bocaneri has joined #ruby
phredus has quit [Remote host closed the connection]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phredus has joined #ruby
phredus has quit [Remote host closed the connection]
phredus has joined #ruby
tomphp has joined #ruby
phredus has quit [Remote host closed the connection]
ichkv has joined #ruby
phredus has joined #ruby
conta has joined #ruby
elastix has joined #ruby
ichkv has quit [Remote host closed the connection]
ichkv has joined #ruby
ichkv has quit [Remote host closed the connection]
elifoster has quit [Quit: sleep]
elenatanasoiu has quit [Ping timeout: 256 seconds]
xall_ has joined #ruby
aidalgol has joined #ruby
xall has quit [Ping timeout: 256 seconds]
xall__ has joined #ruby
firstdayonthejob has joined #ruby
elenatanasoiu has joined #ruby
ichkv has joined #ruby
xall_ has quit [Ping timeout: 250 seconds]
ichkv has quit [Read error: Connection reset by peer]
arescorpio has quit [Quit: Leaving.]
rajdesai has joined #ruby
marr has joined #ruby
mluts has quit [Ping timeout: 250 seconds]
pmunt has quit [Ping timeout: 244 seconds]
aidalgol has quit [Remote host closed the connection]
aidalgol has joined #ruby
aidalgol is now known as Guest32640
rippa has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tristanp has joined #ruby
vuoto has joined #ruby
NTrash has joined #ruby
ichkv has joined #ruby
gusrub has joined #ruby
tristanp has quit [Ping timeout: 250 seconds]
xall__ has quit [Ping timeout: 260 seconds]
ichkv has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
gusrub has quit [Ping timeout: 260 seconds]
elastix has quit [Quit: Leaving]
Devalo has joined #ruby
tanishafied has joined #ruby
sphex has quit [Ping timeout: 260 seconds]
Devalo has quit [Ping timeout: 256 seconds]
tanishafied has quit [Ping timeout: 260 seconds]
ichkv has joined #ruby
elenatanasoiu has quit [Ping timeout: 260 seconds]
ichkv has quit [Read error: Connection reset by peer]
josuah has joined #ruby
sphex has joined #ruby
Guest32640 is now known as aidalgol
aidalgol has quit [Remote host closed the connection]
Lyubo1 has quit [Ping timeout: 268 seconds]
josuah has quit [Remote host closed the connection]
pawnbox_ has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
last_staff has joined #ruby
bob434 has quit [Quit: This computer has gone to sleep]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Devalo has joined #ruby
vuoto has quit [Remote host closed the connection]
Lyubo1 has joined #ruby
ichkv has joined #ruby
modlin has quit [Quit: My laptop has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
ichkv has quit [Remote host closed the connection]
agent_white has joined #ruby
ace05 has quit [Remote host closed the connection]
Gasher has joined #ruby
ichkv has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
Lyubo1 has quit [Ping timeout: 250 seconds]
rajdesai has quit [Remote host closed the connection]
ichkv has quit [Read error: Connection reset by peer]
rajdesai has joined #ruby
rajdesai_ has joined #ruby
rajdesai_ has quit [Read error: Connection reset by peer]
firstdayonthejob has quit [Quit: WeeChat 1.6]
Gasher has quit [Ping timeout: 276 seconds]
rajdesai has quit [Ping timeout: 245 seconds]
firstdayonthejob has joined #ruby
galeido has quit [Changing host]
galeido has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
vuoto has joined #ruby
DoubleMalt has joined #ruby
G_ is now known as G
rajdesai has joined #ruby
ych has joined #ruby
Prawnzy has quit [Remote host closed the connection]
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
sphex has quit [Ping timeout: 244 seconds]
TheCubeLord has joined #ruby
ace05 has joined #ruby
sphex has joined #ruby
igniting has quit [Remote host closed the connection]
Jameser has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
ace05 has quit [Ping timeout: 252 seconds]
igniting has joined #ruby
Jameser has quit [Read error: Connection reset by peer]
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
GodFather__ has joined #ruby
rajdesai has quit [Ping timeout: 245 seconds]
SCHAAP137 has joined #ruby
hogetaro has joined #ruby
modlin has joined #ruby
ych has quit [Ping timeout: 244 seconds]
mikecmpbll has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 250 seconds]
igniting has quit [Read error: Connection reset by peer]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest51599 has quit [Quit: relate to the matter as i drop the bomb]
rajdesai has joined #ruby
armin has joined #ruby
modlin has quit [Quit: My laptop has gone to sleep. ZZZzzz…]
yqt has quit [Ping timeout: 256 seconds]
last_staff has joined #ruby
miqlas-H has joined #ruby
Burgestrand has joined #ruby
sphex has quit [Ping timeout: 250 seconds]
sphex has joined #ruby
y2mq37 has quit [Ping timeout: 260 seconds]
Burgestrand has quit [Client Quit]
tristanp has joined #ruby
igniting has joined #ruby
sonOfRa has quit [Quit: Bye!]
rajdesai has quit [Remote host closed the connection]
ur5us has joined #ruby
tristanp has quit [Ping timeout: 260 seconds]
sonOfRa has joined #ruby
last_staff has quit [Quit: last_staff]
yardenbar has quit [Ping timeout: 260 seconds]
Burgestrand has joined #ruby
mluts has joined #ruby
workmad3 has joined #ruby
sphex has quit [Ping timeout: 260 seconds]
GodFather__ is now known as GodFather
yqt has joined #ruby
roamingdog has joined #ruby
gizmore has quit [Ping timeout: 256 seconds]
A124 has quit [Read error: Connection reset by peer]
A124 has joined #ruby
gizmore has joined #ruby
ace05 has joined #ruby
mluts has quit [Quit: leaving]
workmad3 has quit [Ping timeout: 250 seconds]
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
QORRiE has joined #ruby
workmad3 has joined #ruby
JeanCarloMachado has joined #ruby
ace05 has quit [Ping timeout: 260 seconds]
mluts has joined #ruby
elenatanasoiu has joined #ruby
sphex has joined #ruby
anjana has joined #ruby
ledestin has quit [Read error: Connection reset by peer]
anjana_ has joined #ruby
anjana has quit [Ping timeout: 252 seconds]
mluts has quit [Quit: leaving]
mluts has joined #ruby
mluts has quit [Client Quit]
mluts has joined #ruby
rajdesai has joined #ruby
mluts has quit [Client Quit]
rajdesai_ has joined #ruby
mluts has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
tanishafied has joined #ruby
workmad3 has joined #ruby
rajdesai has quit [Ping timeout: 250 seconds]
c355e3b has joined #ruby
cariveri has joined #ruby
tanishafied has quit [Ping timeout: 256 seconds]
NTrash has quit [Quit: Konversation terminated!]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cariveri>
Hi . What does "... do |name1, name2|" mean? where does the value of those variables come from?
rajdesai has joined #ruby
elenatanasoiu has quit [Ping timeout: 250 seconds]
rajdesai_ has quit [Ping timeout: 256 seconds]
sphex has quit [Ping timeout: 276 seconds]
<hanmac>
cariveri: block parameters ... they are coming from inside the function you leave out with "..."
workmad3 has quit [Ping timeout: 260 seconds]
last_staff has joined #ruby
al2o3-cr has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
workmad3 has joined #ruby
Guest32995 has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
GodFather has quit [Ping timeout: 244 seconds]
tomphp has joined #ruby
nadir has joined #ruby
pawnbox has joined #ruby
nuck has joined #ruby
nuck is now known as Guest7486
ur5us has quit [Ping timeout: 265 seconds]
pragmaticus has joined #ruby
_whitelogger has joined #ruby
Prawnzy has joined #ruby
last_staff has quit [Quit: last_staff]
JeanCarl1Machado has joined #ruby
varsha has joined #ruby
roamingdog has quit [Remote host closed the connection]
Prawnzy has quit [Ping timeout: 265 seconds]
ace05 has joined #ruby
conta has joined #ruby
nettoweb has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
Jackneill_ has joined #ruby
ace05 has quit [Ping timeout: 250 seconds]
SCHAAP137 has quit [Quit: Leaving]
ichkv has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
johnmilton has joined #ruby
johnmilton has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 265 seconds]
oblique has quit [Quit: leaving]
tk__ has joined #ruby
nettoweb1 has joined #ruby
nettoweb has quit [Ping timeout: 265 seconds]
c0mrad3 has joined #ruby
anjana_ has quit [Remote host closed the connection]
gusrub has joined #ruby
bob434 has joined #ruby
Tempesta has quit [Ping timeout: 252 seconds]
aryaching has quit [Ping timeout: 244 seconds]
gusrub has quit [Ping timeout: 260 seconds]
oblique has joined #ruby
saneax-_-|AFK is now known as saneax
vuoto has quit [Remote host closed the connection]
cdg has joined #ruby
pawnbox has quit [Remote host closed the connection]
sphex has joined #ruby
ThatchAcre has joined #ruby
pawnbox has joined #ruby
sdothum has joined #ruby
sphex has quit [Ping timeout: 250 seconds]
tristanp has joined #ruby
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
porfa has joined #ruby
johnmilton has joined #ruby
saneax is now known as saneax-_-|AFK
tristanp has quit [Ping timeout: 276 seconds]
sphex has joined #ruby
ThatchAcre has quit [Remote host closed the connection]
ThatchAcre has joined #ruby
YaknotiS has joined #ruby
juanfra has quit [Quit: juanfra]
marr has joined #ruby
sptgugja has joined #ruby
ichkv has quit [Read error: Connection reset by peer]
TheCubeLord has quit [Changing host]
TheCubeLord has joined #ruby
devyn has quit [Read error: Connection reset by peer]
JeanCarl1Machado has quit [Ping timeout: 276 seconds]
anonV has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
ita_HEISLER has joined #ruby
<ita_HEISLER>
OLA
sphex has quit [Ping timeout: 250 seconds]
ita_HEISLER has quit [Client Quit]
Pupeno has quit [Remote host closed the connection]
HEISLERITA has joined #ruby
ace05 has joined #ruby
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
anonV has quit [Quit: Ex-Chat]
Rodya_ has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has quit [Quit: conta]
ace05 has quit [Ping timeout: 250 seconds]
ThatchAcre_ has joined #ruby
rajdesai has quit [Ping timeout: 276 seconds]
porfa has quit [Ping timeout: 244 seconds]
ThatchAcre has quit [Ping timeout: 250 seconds]
bob434 has quit [Quit: This computer has gone to sleep]
bob434 has joined #ruby
JoshS has quit [Read error: Connection reset by peer]
blackwind_123 has quit [Ping timeout: 260 seconds]
JoshS has joined #ruby
sphex has joined #ruby
mluts has quit [Ping timeout: 265 seconds]
blackwind_123 has joined #ruby
tanishafied has joined #ruby
Tempesta has joined #ruby
HEISLERITA has quit [Ping timeout: 265 seconds]
Pupeno has joined #ruby
sphex has quit [Remote host closed the connection]
tanishafied has quit [Ping timeout: 250 seconds]
pawnbox_ has joined #ruby
sphex has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
JoshS has quit [Ping timeout: 250 seconds]
SuperLag has quit [Ping timeout: 244 seconds]
SuperLag has joined #ruby
tomphp has joined #ruby
HEISLERITA has joined #ruby
charliesome has joined #ruby
ichkv has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
anjana has joined #ruby
Mon_Ouie has quit [Ping timeout: 244 seconds]
ichkv has quit [Read error: Connection reset by peer]
Pupeno has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 265 seconds]
QORRiE has quit [Ping timeout: 276 seconds]
vuoto has joined #ruby
kies has joined #ruby
Prawnzy has joined #ruby
ichkv has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Prawnzy has quit [Ping timeout: 244 seconds]
bovis has joined #ruby
HEISLERITA has quit [Ping timeout: 265 seconds]
shinnya has joined #ruby
saneax-_-|AFK is now known as saneax
yardenbar has joined #ruby
hays is now known as KnightsWhoSayVPN
QORRiE has joined #ruby
KnightsWhoSayVPN is now known as hays
Pumukel has joined #ruby
eelster has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
tubuliferous has joined #ruby
mahlon has quit [Ping timeout: 250 seconds]
QORRiE has quit [Ping timeout: 265 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TreyG has joined #ruby
Lyubo1 has joined #ruby
sevenine has joined #ruby
gingray has joined #ruby
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ichkv has quit [Read error: Connection reset by peer]
HEISLERITA has joined #ruby
DLSteve has joined #ruby
frankiee_ has joined #ruby
gingray has quit [Ping timeout: 250 seconds]
QORRiE has joined #ruby
tomphp has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
JeanCarloMachado has joined #ruby
sepp2k has joined #ruby
tristanp has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Robtop__ has quit [Ping timeout: 245 seconds]
mahlon has joined #ruby
kt3k has joined #ruby
SCHAAP137 has joined #ruby
tristanp has quit [Ping timeout: 265 seconds]
inteq has joined #ruby
shinnya has quit [Ping timeout: 250 seconds]
nettoweb has joined #ruby
JeanCarloMachado has quit [Ping timeout: 252 seconds]
roamingdog has joined #ruby
porfa has joined #ruby
webus has joined #ruby
pwnd_nsfw has joined #ruby
<porfa>
hello guys
tubuliferous has quit [Ping timeout: 260 seconds]
<porfa>
how can i check the lenght of an item inside an array? for ie ["385", "65", "R22", "5", "158K", "runderneuert", "Karkassqualit", "t", "NV"] i want to check the lenght of the fourth element, so i can perform something else acoordingly to the result
roamingdog has quit [Remote host closed the connection]
<ciawal>
do you know how to check the length of a string?
eelster has quit [Ping timeout: 260 seconds]
roamingdog has joined #ruby
igniting has quit [Ping timeout: 260 seconds]
<porfa>
ciawal yeah i just put .lenght in front of it..
<ciawal>
after it
<ciawal>
do you know how to get the fourth element from the array?
<porfa>
yeahs bllblaba[3]
<porfa>
wow, thank you so much :|
<porfa>
haha
<porfa>
i get it now, thank you… sometimes i gotta slow down a break it down better
SCHAAP137 has quit [Read error: Connection reset by peer]
ichkv has joined #ruby
cdg has quit [Remote host closed the connection]
ace05 has joined #ruby
SCHAAP137 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 245 seconds]
ace05 has quit [Ping timeout: 260 seconds]
igniting has joined #ruby
varsha has quit [Quit: Connection closed for inactivity]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ichkv has quit [Read error: Connection reset by peer]
nadir has quit [Quit: Connection closed for inactivity]
charliesome has joined #ruby
epitron has quit [Ping timeout: 268 seconds]
<hanmac>
porfa: before you do array[3] you might check if the array does have four or more elements (depending on your input)
Devalo has quit [Remote host closed the connection]
elastix has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
aryaching has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
bluOxigen has quit [Ping timeout: 260 seconds]
firstdayonthejob has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_sfiguser has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
AndChat51401 has joined #ruby
AndChat51401 has quit [Max SendQ exceeded]
tk__ has quit [Quit: ばいばい]
AndChat51401 has joined #ruby
AndChat51401 has quit [Max SendQ exceeded]
AndChat51401 has joined #ruby
AndChat51401 has quit [Max SendQ exceeded]
sevenine has quit [Ping timeout: 244 seconds]
ichkv has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
rattatmatt has joined #ruby
ledestin has joined #ruby
mvxlr has joined #ruby
mvxlr has quit [Client Quit]
TreyG_ has joined #ruby
vasilakisfil has quit [Remote host closed the connection]
modlin has joined #ruby
epitron has joined #ruby
ichkv has quit [Read error: Connection reset by peer]
trampi has joined #ruby
TreyG has quit [Ping timeout: 265 seconds]
pwnd_nsfw has joined #ruby
solocshaw has joined #ruby
TreyG has joined #ruby
TreyG_ has quit [Ping timeout: 250 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
Bloomer has joined #ruby
<bovis>
In what cases do you prefer to use modules as mixins? In what cases do you want them as just namespaces for constants or methods?
tanishafied has joined #ruby
inteq has quit []
<bovis>
I keep running into the problem where something like instantiation.send(method_name) is cluttered because I mix in like three modules to a class.
Prawnzy has joined #ruby
ichkv has joined #ruby
kegster has quit [Quit: Shiner, TX makes good beer.]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skweek has joined #ruby
kegster has joined #ruby
tanishafied has quit [Ping timeout: 244 seconds]
roamingdog has joined #ruby
Prawnzy has quit [Ping timeout: 256 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ichkv has quit [Read error: Connection reset by peer]
ThatchAcre_ has quit [Remote host closed the connection]
Xentil has joined #ruby
saneax is now known as saneax-_-|AFK
willian has joined #ruby
redpants has joined #ruby
<Papierkorb>
bovis: What does #send have to do with mixins?
elastix has quit [Ping timeout: 265 seconds]
yardenbar has quit [Ping timeout: 244 seconds]
<Papierkorb>
bovis: Mixins are really useful if you want to further describe an object rather than defining what it is - if that makes sense.
<Papierkorb>
bovis: So, multiple includes are in themself not bad
<bovis>
Say I have a User class that has print, add, and delete methods. If I instantiate a User class and allow the user to chooses "print" as the action they want. instantiation.send(string). The string then has open access to any method that matches the string.
ledestin has joined #ruby
<bovis>
The mixins then muddy the waters, because the user could choose a method name that isn't print, add, or delete.
<bovis>
To me, it screams, Make Smaller Classes. Or just dump the mixins if possible.
charliesome has joined #ruby
roamingdog has quit [Remote host closed the connection]
<Papierkorb>
bovis: making smaller classes is still a good idea. However, mixins isn't your issue
<hanmac>
allowing the user to input method names is always some bad idea ... (if you want security)
<bovis>
In the above case, "print" is fine, because it's what I want the user to do. But I have a color mixin, for instance, and the user calling "color" wouldn't be destructive necessarily, it just wouldn't do any good.
<Papierkorb>
bovis: your issue is that you don't whitelist the allowed methods to call
<bovis>
Right now, I just check user input against an array of allowed phrases ("print", "delete" etc.)
<bovis>
It seems overkill or just bad design
<Papierkorb>
bovis: Whitelists are neither overkill nor bad design
<Papierkorb>
bovis: That's what you usually do when you, for whatever reason, want to let the user choose a method to call
<bovis>
So I'm doing the right thing with the array? Somehow, I figured it would be better to continue working with .send and just shortlist the Class in question, maybe bringing in mixin utilities to the User class by just calling the outside methods explicitly.
roamingdog has joined #ruby
modlin has quit [Quit: My laptop has gone to sleep. ZZZzzz…]
elastix has joined #ruby
elenatanasoiu has joined #ruby
<bovis>
*outside module explicitly
yardenbar has joined #ruby
<Papierkorb>
bovis: In this case, always whitelist
<bovis>
ok
<Papierkorb>
bovis: Keeping classes reasonably sized is always a good idea too. Third, use #public_send over #send
ptx0 has quit [Ping timeout: 276 seconds]
<Papierkorb>
bovis: Use #public_send over #send whenever possible generally
elastix has quit [Client Quit]
SCHAAP137 has quit [Read error: Connection reset by peer]
elastix has joined #ruby
Guest3230 is now known as IceDragon
roamingdog has quit [Ping timeout: 250 seconds]
<bovis>
I wasn't aware of #public_send. In what cases would you use #send? Other than just: when I need a private method... When would you want a private method?
roamingdog has joined #ruby
elenatanasoiu has quit [Ping timeout: 276 seconds]
<elomatreb>
The main benefit of #send is bypassing access controls. You generally avoid that, although it's sometimes done in tests (Another example is instance_variable_get/set)
vuoto has quit [Remote host closed the connection]
Bloomer has quit [Remote host closed the connection]
<bovis>
ok
<porfa>
“ n�” instead of “nã” < do theese look the same to you? my irb displays the first instead of the second, how do fix this?
<bovis>
different to me, an unrecognized character after "n" in the first example
<porfa>
but it’s just ã
<elomatreb>
Welcome to the magical world of encoding problems
<porfa>
nokogiri is giving me that instead of ã and i don’t understand why
<porfa>
hahaha
conta has joined #ruby
<apeiros>
� means that there's an illegal sequence
<apeiros>
and that in turn means that you (most likely) told ruby/nokogiri that your string was utf-8, while it really wasn't.
<apeiros>
and "told" can be implicitly, by relying on defaults.
<elomatreb>
(Or it assumed it was UTF-8, which is generally a good thing)
<apeiros>
na, I prefer "you told". programmers have to be aware of defaults.
<porfa>
i did
<porfa>
Nokogiri::HTML(open(url_pneucity).read, nil, 'utf-8') if i didn’t have that, some urls with special characters did no open at all
cariveri has quit [Remote host closed the connection]
nfk has joined #ruby
bihi has quit [Quit: Bye!]
<apeiros>
porfa: websites tell you in two ways which encoding they're using. the http headers and the meta tags
<apeiros>
(not that they're necessarily telling the truth, though)
frankiee_ has quit [Quit: leaving]
bihi has joined #ruby
JeanCarloMachado has joined #ruby
salut has quit [Quit: salut]
modlin has joined #ruby
HEISLERITA has quit [Quit: Leaving]
quazimodo has joined #ruby
QORRiE has quit [Ping timeout: 250 seconds]
mhib has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ptx0 has joined #ruby
elastix has quit [Ping timeout: 260 seconds]
imightbestupid12 has joined #ruby
tanishafied has joined #ruby
solocshaw has quit [Ping timeout: 245 seconds]
ichkv has joined #ruby
tanishafied has quit [Ping timeout: 260 seconds]
tanishafied has joined #ruby
tanishafied has quit [Client Quit]
SteenJobs has joined #ruby
QORRiE has joined #ruby
ichkv has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
charliesome has joined #ruby
TreyG_ has joined #ruby
QORRiE has quit [Quit: Leaving]
ace05 has joined #ruby
harai has joined #ruby
elastix has joined #ruby
konsolebox has joined #ruby
TreyG has quit [Ping timeout: 265 seconds]
BTRE has quit [Quit: Leaving]
gnufied has joined #ruby
ace05 has quit [Ping timeout: 250 seconds]
BTRE has joined #ruby
<bovis>
Is either `ls` or %x{ls} preferred to run a unix command? Example here ls.
<elomatreb>
I generally avoid the % literals (except for string arrays) unless they are useful to avoid having to backslash-escape
<bovis>
elomatreb: What are the downsides of the literals?
redpants has quit [Ping timeout: 250 seconds]
Pupeno has quit [Quit: Leaving...]
<elomatreb>
bovis: None, they are just very ruby-specific and can be confusing for programmers from other languages. You have to remember what "x" does as opposed to other modes
gnufied has quit [Ping timeout: 256 seconds]
<elomatreb>
backticks being "execute command, return standard output" is very common in many scripting languages
ichkv has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
modlin has quit [Quit: My laptop has gone to sleep. ZZZzzz…]
webus has quit [Ping timeout: 260 seconds]
vuoto has joined #ruby
ace05 has joined #ruby
<bovis>
konsolebox: looks like either method has the ability to take multiple carraige returns
<konsolebox>
bovis: yes i noticed it
<konsolebox>
bovis: but i'm not sure why the other answer had to say that it needs \. maybe ruby's behavior has changed
<bovis>
konsolebox: yes, the answers look contradictory...
minimalism has quit [Quit: minimalism]
ricochet has joined #ruby
<bovis>
konsolebox: irb seems to accept \, but not without
<bovis>
^^ using ` `
<bovis>
with %x, the multiple lines don't give irb trouble when omitting the \
charliesome has joined #ruby
charliesome_ has quit [Ping timeout: 250 seconds]
ricochet has left #ruby [#ruby]
djbkd has joined #ruby
anjana has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
anjana has joined #ruby
Rodya_ has joined #ruby
<konsolebox>
in shell, when writing command-substitution commands, i use $(), and i'm not a fan of the deprecated backticks, so i prefer %x(), which aligns with it
anjana has quit [Ping timeout: 265 seconds]
mluts has joined #ruby
ichkv has joined #ruby
<bovis>
konsolebox: why are the backticks deprecated if, like elomatreb said, they are common in other languages?
<elomatreb>
bovis: I think konsolebox meant deprecated in shell syntax, right?
Rodya_ has quit [Remote host closed the connection]
danmcguire has left #ruby ["WeeChat 1.4"]
UUHR4HUR has joined #ruby
Rodya_ has joined #ruby
vuoto has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 244 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
Rodya_ has quit [Remote host closed the connection]
<konsolebox>
yes, i meant the shell syntax.
<bovis>
oh ok
willian has quit [Quit: Leaving]
tomphp has joined #ruby
nadir has joined #ruby
lenwood has quit [Quit: Konversation terminated!]
lenwood has joined #ruby
Rodya_ has joined #ruby
dviola has joined #ruby
wjimenez5271 has quit [Ping timeout: 244 seconds]
ledestin has quit [Ping timeout: 244 seconds]
ichkv has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 256 seconds]
jphase has joined #ruby
Snowy has joined #ruby
ace05 has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Snowy has quit [Client Quit]
Rodya_ has quit [Remote host closed the connection]
ace05 has joined #ruby
wjimenez5271 has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
lenwood has quit [Ping timeout: 265 seconds]
UUHR4HUR has quit [Remote host closed the connection]
rippa has joined #ruby
Rodya_ has joined #ruby
ichkv has joined #ruby
Prawnzy has joined #ruby
konsolebox has quit [Quit: Leaving]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rattatmatt has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
imightbestupid12 has quit [Quit: Page closed]
ichkv has quit [Read error: Connection reset by peer]
f4 has joined #ruby
elenatanasoiu has joined #ruby
axisys has quit [Read error: Connection reset by peer]
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
Prawnzy has quit [Remote host closed the connection]
anjana has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
Guest7486 has quit [Changing host]
Guest7486 has joined #ruby
Guest7486 is now known as nuck
pawnbox_ has quit [Remote host closed the connection]
redpants has joined #ruby
pawnbox has joined #ruby
Alka has joined #ruby
JoshS has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
xall__ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 265 seconds]
ichkv has joined #ruby
JeanCarloMachado has joined #ruby
ichkv has quit [Read error: Connection reset by peer]
JoshS has quit [Quit: Leaving]
SCHAAP137 has joined #ruby
djbkd has joined #ruby
JoshS has joined #ruby
igniting has quit [Ping timeout: 244 seconds]
fullofcaffeine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
djbkd_ has joined #ruby
tomphp has joined #ruby
jgnagy has joined #ruby
Devalo has joined #ruby
djbkd_ has quit [Ping timeout: 256 seconds]
yqt has quit [Ping timeout: 265 seconds]
webus has joined #ruby
chazu has joined #ruby
elifoster has joined #ruby
SCHAAP137 has quit [Ping timeout: 265 seconds]
TreyG has joined #ruby
Arney has joined #ruby
dionysus69 has joined #ruby
ichkv has joined #ruby
TreyG_ has quit [Ping timeout: 265 seconds]
pragmaticus has quit [Remote host closed the connection]
eelster has joined #ruby
ramfjord has joined #ruby
TreyG_ has joined #ruby
Cohedrin has joined #ruby
cevett has joined #ruby
banisterfiend has joined #ruby
cevett has quit [Read error: Connection reset by peer]
cevett has joined #ruby
dnicole has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
TreyG has quit [Ping timeout: 250 seconds]
cevett has quit [Client Quit]
cevett has joined #ruby
<cevett>
pardon my being green, im running into an issue with rake where it can't find a gem when it kicks off rake rspec, but when i run rspec outside of rake it sees it just fine
<cevett>
so rake fails because it can't 'require' a certain gem
davidt has joined #ruby
<cevett>
the require statement is in my spec_helper.rb
banisterfiend has quit [Ping timeout: 260 seconds]