orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pastorinni has joined #ruby
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
RealMarc has quit [Ping timeout: 264 seconds]
k0mpa has quit [Remote host closed the connection]
marr has quit [Ping timeout: 255 seconds]
mitchellvanw has quit [Ping timeout: 255 seconds]
mitchellvanw has joined #ruby
zapata has quit [Ping timeout: 255 seconds]
pastorinni has quit [Ping timeout: 265 seconds]
RealMarc has joined #ruby
zapata has joined #ruby
orbyt_ has joined #ruby
ta_ has quit [Ping timeout: 272 seconds]
gnufied has quit [Quit: Leaving]
ta_ has joined #ruby
scmlinux has quit [Remote host closed the connection]
RougeT430 has joined #ruby
webguynow has quit [Ping timeout: 248 seconds]
webguynow has joined #ruby
QualityAddict has quit [Remote host closed the connection]
enterprisey has joined #ruby
zwliew has joined #ruby
QualityAddict has joined #ruby
neo95_ has quit [Quit: Leaving]
_musl_ has quit [Quit: WeeChat 1.8]
alfiemax has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
jnollette has quit [Ping timeout: 248 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 256 seconds]
minimalism has quit [Quit: minimalism]
d^sh has quit [Ping timeout: 264 seconds]
pilne has quit [Quit: Quitting!]
d^sh has joined #ruby
ta_ has quit [Ping timeout: 255 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
leitz has quit [Quit: Nappy time]
jnollette has joined #ruby
ta_ has joined #ruby
skweek has quit [Ping timeout: 264 seconds]
Dimik has quit [Ping timeout: 265 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rrutkowski has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
bmurt has joined #ruby
rrutkowski has quit [Client Quit]
theRealGent has joined #ruby
rrutkowski has joined #ruby
mtkd has quit [Ping timeout: 265 seconds]
iMadper has joined #ruby
mtkd has joined #ruby
vee__ has quit [Ping timeout: 248 seconds]
<Radar>
havenwood: right. I was trying to do it without using an extra gem. But given this project is already using some of the dry-* class of gems, dry-struct probably makes the most sense.
pastorinni has joined #ruby
bmurt has quit [Remote host closed the connection]
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
orbyt_ has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
hahuang65 has joined #ruby
vee__ has joined #ruby
ta_ has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
davidcsi has quit [Ping timeout: 272 seconds]
bmurt has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
theRealGent has quit [Quit: Leaving]
MrBusiness has joined #ruby
astronavt has joined #ruby
DmitryBochkarev has joined #ruby
tcopeland_ has joined #ruby
tcopeland has quit [Ping timeout: 240 seconds]
tcopeland_ is now known as tcopeland
pastorinni has quit [Remote host closed the connection]
skweek has joined #ruby
bmurt has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 272 seconds]
RougeT430 has quit [Ping timeout: 248 seconds]
ta_ has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
rrutkowski has quit [Ping timeout: 265 seconds]
tcopeland_ has joined #ruby
tcopeland has quit [Ping timeout: 248 seconds]
tcopeland_ is now known as tcopeland
cschneid_ has joined #ruby
AJA4350 has quit [Quit: AJA4350]
alfiemax has quit [Ping timeout: 248 seconds]
SCHAPiE has quit [Excess Flood]
al2o3-cr has quit [Ping timeout: 240 seconds]
SCHAPiE has joined #ruby
cschnei__ has joined #ruby
pastorinni has joined #ruby
cschneid_ has quit [Ping timeout: 256 seconds]
vee__ has quit [Ping timeout: 256 seconds]
vee__ has joined #ruby
zwliew has quit [Quit: Connection closed for inactivity]
Takumo has quit [Quit: WeeChat 1.4]
gix- has joined #ruby
gix has quit [Disconnected by services]
ta_ has quit [Ping timeout: 268 seconds]
naprimer2 has quit [Ping timeout: 272 seconds]
naprimer has joined #ruby
jenrzzz has joined #ruby
nso95- is now known as nso95
nso95 has quit [Changing host]
nso95 has joined #ruby
ta_ has joined #ruby
monodoh has joined #ruby
monodoh has left #ruby [#ruby]
al2o3-cr has joined #ruby
plexigras has quit [Ping timeout: 255 seconds]
pastorinni has quit [Remote host closed the connection]
plexigras has joined #ruby
rrutkowski has joined #ruby
A124 has quit [Ping timeout: 272 seconds]
d^sh has quit [Ping timeout: 248 seconds]
rhebz916 has joined #ruby
d^sh has joined #ruby
A124 has joined #ruby
A124 has quit [Ping timeout: 240 seconds]
maum has quit [Remote host closed the connection]
troys_ is now known as troys
astronavt has quit [Quit: Leaving...]
dviola has quit [Quit: WeeChat 2.0]
nadir has joined #ruby
mtkd has quit [Ping timeout: 272 seconds]
A124 has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
ta_ has quit [Ping timeout: 248 seconds]
chmurifree has quit [Ping timeout: 272 seconds]
Emmanuel_Chanel has joined #ruby
ta_ has joined #ruby
hahuang65 has joined #ruby
rhebz916 has quit [Ping timeout: 248 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has quit [Ping timeout: 248 seconds]
chmurifree has joined #ruby
coderphive has quit [Ping timeout: 240 seconds]
coderphive has joined #ruby
anisha has joined #ruby
garyserj has quit [Ping timeout: 260 seconds]
garyserj has joined #ruby
rhebz916 has joined #ruby
ur5us has quit [Remote host closed the connection]
troys is now known as troys_
armyriad has quit [Quit: Leaving]
armyriad has joined #ruby
rrutkowski has left #ruby [#ruby]
aupadhye has joined #ruby
iamarun has joined #ruby
ta_ has quit [Ping timeout: 264 seconds]
cschnei__ has quit [Remote host closed the connection]
dionysus69 has joined #ruby
rhebz916 has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
duderono_ has joined #ruby
duderonomy has quit [Read error: Connection reset by peer]
troys_ is now known as troys
rhebz916 has joined #ruby
pharma_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
skweek has quit [Quit: Leaving]
skweek has joined #ruby
skweek has quit [Remote host closed the connection]
skweek has joined #ruby
pb122-two has joined #ruby
pb122 has quit [Read error: Connection reset by peer]
skweek has quit [Remote host closed the connection]
skweek has joined #ruby
skweek has quit [Client Quit]
skweek has joined #ruby
cdg has joined #ruby
alfiemax has quit [Remote host closed the connection]
meesles has quit []
rippa has joined #ruby
cdg has quit [Ping timeout: 255 seconds]
vee__ has quit [Ping timeout: 248 seconds]
s2013 has joined #ruby
alfiemax has joined #ruby
reber has joined #ruby
vee__ has joined #ruby
sundhell_away is now known as sundhell
John__ has quit [Quit: Систем политик аметзит, крэтин щй ваи д ел.]
bronson has quit [Read error: Connection reset by peer]
alfiemax has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
cadillac_ has joined #ruby
ferr has left #ruby ["WeeChat 2.0"]
cabotto has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
alex`` has quit [Quit: WeeChat 2.0]
bkxd has joined #ruby
kies has quit [Ping timeout: 265 seconds]
ams__ has joined #ruby
Cavallari has joined #ruby
Junaos has quit [Ping timeout: 240 seconds]
nevermoregnr has joined #ruby
eam has quit [Ping timeout: 240 seconds]
Junaos has joined #ruby
eam has joined #ruby
alfiemax_ has joined #ruby
Neptu_ is now known as Neptu
alfiemax_ has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
jsrtr has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
leitz has joined #ruby
<leitz>
What are the options for a Ruby CLI program to display, edit, and save multi-line text? For example, to pull a set of lines from a config file, let you edit them, and then end the edit session.
code_zombie has quit [Quit: Leaving]
Beams_ has joined #ruby
Beams has quit [Ping timeout: 260 seconds]
jsrtr has joined #ruby
jameser has quit [Read error: Connection reset by peer]
jameser has joined #ruby
bkxd has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
amatas has joined #ruby
workmad3 has joined #ruby
ldnunes has joined #ruby
alfiemax has joined #ruby
cabotto has quit [Remote host closed the connection]
cabotto has joined #ruby
al2o3-cr has joined #ruby
rhebz916 has quit [Quit: Leaving]
coderxin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cabotto has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 248 seconds]
ur5us has quit [Remote host closed the connection]
bkxd has joined #ruby
bkxd_ has joined #ruby
ur5us has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
al2o3-cr has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
minimalism has joined #ruby
hahuang65 has joined #ruby
cdg has quit [Ping timeout: 255 seconds]
cabotto has joined #ruby
hahuang65 has quit [Ping timeout: 268 seconds]
leitz has quit [Quit: Nappy time]
bkxd has joined #ruby
bkxd has quit [Max SendQ exceeded]
bkxd has joined #ruby
KeyJoo has quit [Ping timeout: 264 seconds]
bkxd_ has quit [Ping timeout: 256 seconds]
cabotto has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
alfiemax has quit [Remote host closed the connection]
JaccoP has joined #ruby
tcopeland has quit [Quit: tcopeland]
bkxd has joined #ruby
bkxd has quit [Max SendQ exceeded]
shinnya has joined #ruby
scmlinux has joined #ruby
Sina has quit [Quit: Connection closed for inactivity]
bkxd has joined #ruby
Psybur has joined #ruby
ana_ has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
conta has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
milardovich has joined #ruby
alex has joined #ruby
Beams_ has quit [Quit: .]
cabotto has joined #ruby
tvw has joined #ruby
ana_ has joined #ruby
alfiemax has joined #ruby
alex has quit [Killed (adams.freenode.net (Nickname regained by services))]
Guest19292 has joined #ruby
pikislabis has quit [Quit: pikislabis]
bkxd has quit [Ping timeout: 264 seconds]
Guest19292 is now known as alex``
scmlinux has quit [Read error: Connection reset by peer]
scmlinux has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
tvw has quit [Ping timeout: 272 seconds]
conta has quit [Quit: conta]
conta has joined #ruby
pikislabis has joined #ruby
conta has quit [Client Quit]
rhebz916 has joined #ruby
Musashi007 has joined #ruby
DaniG2k has joined #ruby
evidex has joined #ruby
mistergibson has joined #ruby
Beams has joined #ruby
coderxin has joined #ruby
morfin60 has joined #ruby
<morfin60>
what happens if you include something twice?
<morfin60>
ancestors list will have only one item anyway right?
<ar>
morfin60: you mean, `require`?
<morfin60>
include in class
jnyw has quit [Quit: WeeChat 2.0]
<apeiros>
morfin60: depends. if it's in the same class - nothing afaik
<apeiros>
iirc it's slightly different if you include it twice in an ancestry chain. got to try how exactly, though
<apeiros>
oh, the self.included callback is triggered every time you include it. so not really nothing.
al2o3-cr has quit [Ping timeout: 240 seconds]
<morfin60>
hmmm
<morfin60>
i want to use paperclip gem in both rails app and application using ActiveRecord without rails
<morfin60>
models are in shared gem
miskatonic has joined #ruby
<morfin60>
in Rails application there is Railtie which basically include Paperclip::Glue into ActiveRecord::base class
<morfin60>
but outside of Rails application i should do this myself to let model use has_attached_file function etc
<apeiros>
should I lol @ line 21?
<morfin60>
hm
<morfin60>
it just reopen class and define class method no?
<apeiros>
yes. it reopens the class it just closed 2 lines above.
<morfin60>
i know idk why they did it
<morfin60>
anyway that's how this is "injected" when inside of Rails app, some guy suggested include Paperclip::Glue in model that's why i asked
<apeiros>
couple of possible approaches: 1) use different requires for in/outside rails (e.g. require 'yourgem/activerecord' vs. 'yourgem/rails') where in the "outside rails" variant, you do the Paperclip::Railtie.insert
<morfin60>
because i am not sure it's right way
<apeiros>
2) just call Paperclip::Railtie.insert regardless and claim it's paperclip's responsibility to handle potential multiple calls
<apeiros>
3) implement an assertion yourself (`unless ActiveRecord::Base < Paperclip::Glue`) and only call Paperclip::Railtie.insert if it passes
<apeiros>
there are certainly even more ways.
Musashi007 has quit [Quit: Musashi007]
skweek has quit [Ping timeout: 248 seconds]
<apeiros>
oh, actually, not Railtie.insert, since that requires Rails (Rails.logger) - replace with "setting the logger yourself + including it in AR::Base"
CrazyEddy has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
Musashi007 has quit [Client Quit]
hs366 has quit [Quit: Leaving]
CrazyEddy has joined #ruby
milardovich has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
tcopeland has joined #ruby
JaccoP has quit [Quit: Leaving]
Psybur has quit [Remote host closed the connection]
Psybur has joined #ruby
AJA4350 has joined #ruby
alfiemax has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
al2o3-cr has joined #ruby
Silthias has joined #ruby
Silthias has left #ruby [#ruby]
reber has quit [Remote host closed the connection]
chocoelho has joined #ruby
synthroid has joined #ruby
ur5us has joined #ruby
Sina has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
pikislabis has quit [Quit: pikislabis]
chocoelho has quit [Ping timeout: 272 seconds]
hahuang65 has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
DaniG2k has quit [Ping timeout: 256 seconds]
zautomata has joined #ruby
DaniG2k has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]
jnollette has quit [Ping timeout: 248 seconds]
jnollette has joined #ruby
jameser has joined #ruby
DaniG2k has quit [Client Quit]
jnollette has quit [Remote host closed the connection]
DmitryBochkarev has joined #ruby
jnollette has joined #ruby
bmurt has joined #ruby
andikr has quit [Remote host closed the connection]
coderxin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aupadhye has quit [Ping timeout: 272 seconds]
aupadhye has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
mtkd has quit [Ping timeout: 264 seconds]
mtkd has joined #ruby
alfiemax has quit [Remote host closed the connection]
Psybur has quit [Remote host closed the connection]
Psybur has joined #ruby
vondruch has joined #ruby
cadillac_ has joined #ruby
Cavallari has quit [Quit: Cavallari]
nevermoregnr has quit [Remote host closed the connection]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
cabotto has quit [Remote host closed the connection]
jameser has joined #ruby
pdcawley has joined #ruby
sammi` has quit [Ping timeout: 240 seconds]
aupadhye has quit [Ping timeout: 264 seconds]
falaafel has joined #ruby
vichib has joined #ruby
sammi` has joined #ruby
aupadhye has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
falaafel has quit [Quit: WeeChat 1.6]
rhebz916 has quit [Quit: Leaving]
mikhael_k33hl has joined #ruby
<mikhael_k33hl>
If I have an instance -instance 1- with an instance variable @var, and I create an instance within that -instance 2- and pass that instance variable @var, will instance 1 and 2's @var point to the same object?
<mikhael_k33hl>
variable, I mean
pdcawley has quit [Quit: pdcawley]
<apeiros>
mikhael_k33hl: you can't point to variables
alfiemax has joined #ruby
<apeiros>
the only way to reference variables is by name. and that's *usually* a bad idea.
<apeiros>
(if done dynamically I mean)
<mikhael_k33hl>
apeiros: Okay I might have said that wrong, what I mean was will the instance variable of instance 1 and 2 point ot the same object?
jameser has joined #ruby
cabotto has joined #ruby
<apeiros>
since your phrasing is not entirely clear, I'll rephrase: a = b # a will now *always* reference the same object as b (until the next assignment to either a or b)
sammi` has quit [Ping timeout: 260 seconds]
<apeiros>
you can check by using e.g. Object#equal? or Object#object_id
alfiemax has quit [Ping timeout: 248 seconds]
<mikhael_k33hl>
Okay so if I have an instance variable A on instance 1, and within instance one I create instance 2 and passed the instance variable A to it, any changes I made on instance 2's instance variable A will reflect on instance 1 right?
<apeiros>
no
<apeiros>
any change made on the *object* will
<apeiros>
the only thing you can change about a variable ever is which object it references
<apeiros>
and that change is not reflected by other variables
<mikhael_k33hl>
okay, so in instance 1 I have instance variable A which points to an Array Object. Within instance 1, I created instance 2 and passed variable A. Will the instance variable within instance 2 point to the same Array object as instance 1?
<apeiros>
yes
<mikhael_k33hl>
Oh okay, got it.
<apeiros>
though IMO at your level of understanding, paste example code to gist.github.com - just to make sure that what you think you say matches with what you actually say
<mikhael_k33hl>
Just needed to confirm. I want to instantiate multiple child objects and share the same Array hehe
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
and as said, you can test for object identity with equal? and object_id
<mikhael_k33hl>
apeiros: yup, will do, thanks mate
mikhael_k33hl has quit [Quit: Page closed]
joast has quit [Quit: Leaving.]
enterprisey has joined #ruby
shinnya has quit [Ping timeout: 272 seconds]
sammi` has joined #ruby
krawchyk has joined #ruby
sammi` has quit [Ping timeout: 264 seconds]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
sammi` has joined #ruby
aupadhye has quit [Ping timeout: 256 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
iamarun has joined #ruby
iamarun has quit [Remote host closed the connection]
vee__ has quit [Ping timeout: 272 seconds]
alfiemax has joined #ruby
dinfuehr has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
Burgestrand has quit [Quit: Closing time!]
ur5us has joined #ruby
jameser has joined #ruby
jameser has quit [Client Quit]
jameser has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
sammi` has quit [Ping timeout: 255 seconds]
sammi` has joined #ruby
vee__ has joined #ruby
polishdub has joined #ruby
jameser has quit [Client Quit]
hahuang65 has joined #ruby
pastorinni has joined #ruby
DmitryBochkarev has joined #ruby
hahuang65 has quit [Ping timeout: 272 seconds]
Ltem has joined #ruby
selim has quit [Ping timeout: 256 seconds]
A124 has quit [Ping timeout: 272 seconds]
selim has joined #ruby
A124 has joined #ruby
safetypin has joined #ruby
morfin60 has quit [Remote host closed the connection]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
CrazyEddy has quit [Ping timeout: 260 seconds]
sammi` has quit [Ping timeout: 264 seconds]
c0ncealed has joined #ruby
stoffus has quit [Ping timeout: 265 seconds]
CrazyEddy has joined #ruby
s2013 has joined #ruby
gregf_ has quit [*.net *.split]
chocoelho has joined #ruby
rrutkowski has quit [Remote host closed the connection]
sammi` has joined #ruby
growp has joined #ruby
Ltem has quit [Quit: bbl]
sammi` has quit [Ping timeout: 240 seconds]
<garyserj>
I can do puts blah[1][0]. But if I do puts blah[2][0] I get an error saying "in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)" How can I test whether accessing blah[2][0] is nil / would cause that error?
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<elomatreb>
Either blah or blah[2] is nil in your case (accessing an array index that doesn't exist silently returns nil with [])
nogic has joined #ruby
<canton7>
see whether blah[2] is nil or not. Check whether 2 is >= blah.length
<elomatreb>
You may want to try Array#dig instead.
troys has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
CrazyEddy has quit [Ping timeout: 255 seconds]
cabotto has quit []
evidex has quit [Quit: leaving]
<garyserj>
thanks. And if it's nil how do I it such that it's not nil so I can do blah[2][0]="asdf"?
joast has joined #ruby
gregf_ has joined #ruby
<canton7>
garyserj, if it's nil, do you want it to be a new array?
<garyserj>
i guess it's adding an array of strings to the blah array.
<garyserj>
that i want to do.
<garyserj>
yeah
<garyserj>
i should be able t ofind how to add an array of strings to an array
cadillac_ has quit [Read error: Connection reset by peer]
ana_ has quit [Ping timeout: 264 seconds]
cdolan has joined #ruby
cschneid_ has joined #ruby
alfiemax has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
ldnunes has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
dviola has joined #ruby
sammi` has joined #ruby
reber has joined #ruby
elisaado has quit [Ping timeout: 240 seconds]
sammi` has quit [Ping timeout: 248 seconds]
apeiros has quit [Ping timeout: 248 seconds]
elisaado has joined #ruby
VladGh_ has quit [Remote host closed the connection]
mostlybadfly has joined #ruby
VladGh has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
k0mpa has joined #ruby
reber has quit [Read error: Connection reset by peer]
reber__ has joined #ruby
cadillac_ has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Ping timeout: 248 seconds]
mikecmpb_ has joined #ruby
KeyJoo has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cadillac_ has joined #ruby
KeyJoo has quit [Remote host closed the connection]
cagomez has joined #ruby
sammi` has joined #ruby
claudiuinberlin has joined #ruby
claudiuinberlin has quit [Client Quit]
jnollette has quit [Ping timeout: 248 seconds]
jnollette has joined #ruby
garyserj has quit []
sammi` has quit [Ping timeout: 264 seconds]
al2o3-cr has joined #ruby
Psybur has quit [Ping timeout: 265 seconds]
mtkd has quit [Ping timeout: 255 seconds]
TomyLobo has joined #ruby
mtkd has joined #ruby
sammi` has joined #ruby
kies has joined #ruby
c0dy has joined #ruby
nogic has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
ur5us has joined #ruby
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 240 seconds]
QualityAddict has quit [Quit: Leaving]
hahuang65 has joined #ruby
Serpent7776 has quit [Quit: Leaving]
hahuang65 has quit [Ping timeout: 248 seconds]
Ishido has quit [Ping timeout: 264 seconds]
aScottishBoat has joined #ruby
k0mpa has quit [Ping timeout: 248 seconds]
SeepingN has joined #ruby
mrBen2k2k2k_ has quit [Ping timeout: 256 seconds]
fschuindt has joined #ruby
<fschuindt>
How can I use Ruby to capture HTTP requests made to my computer in the port 3000, for instance? Like: I want to send Rails a HTTP request and use Ruby outside Rails to get this request too. Is that possible?
mark_66 has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
<SeepingN>
1 thing may listen on a part. 1
<SeepingN>
port
Mvfc has joined #ruby
troulouliou_dev has joined #ruby
Puppet___ has joined #ruby
mrBen2k2k2k has joined #ruby
Puppet_ has quit [Ping timeout: 264 seconds]
<fschuindt>
can I have two softwares listening the same port? I think that's my question
nogic has joined #ruby
duderonomy has joined #ruby
<SeepingN>
I don't think so
jeffreylevesque has joined #ruby
<jeffreylevesque>
i have an array: ['one', 'two', 'three']
<jeffreylevesque>
i want to transform it to {one => {}, two => {}, three => {}}
<jeffreylevesque>
i tried: @extensions.map { |v| {v => {}} }
<jeffreylevesque>
that returned: {"one"=>{}}, {"two"=>{}}, {"three"=>{}}
<Papierkorb>
jeffreylevesque: Have a look at Enumerable#each_with_object
<elomatreb>
fschuindt: Classic approaches include some sort of packet capture software for doing that type of stuff, e.g. tcpdump on linux
<fschuindt>
elomatreb: thank you, mate :)
Beams has quit [Quit: .]
<Papierkorb>
fschuindt: In fact you can have multiple processes listening on the same port and address at once, but it's platform specific. On Linux, you have to set the socket option SO_REUSEPORT
Guest90 has quit [Read error: Connection reset by peer]
Psybur_ has joined #ruby
nogic has quit [Ping timeout: 240 seconds]
CrazyEddy has joined #ruby
RougeT430 has joined #ruby
Asher has quit [Ping timeout: 276 seconds]
jamesaxl has joined #ruby
orbyt_ has joined #ruby
milardovich has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
aupadhye has quit [Remote host closed the connection]
stealth[] has joined #ruby
synthroid has quit [Remote host closed the connection]
Psybur_ has quit [Ping timeout: 260 seconds]
k1ltzman has joined #ruby
apeiros has joined #ruby
CrazyEddy has joined #ruby
Gabemo has joined #ruby
Vile` has joined #ruby
mikecmpbll has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cloaked1 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
despai has quit [Quit: ...]
mikecmpb_ has quit [Ping timeout: 255 seconds]
Psybur has joined #ruby
mostlybadfly has joined #ruby
synthroid has joined #ruby
CrazyEddy has quit [Ping timeout: 248 seconds]
pastorinni has quit [Remote host closed the connection]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
sanscoeur has joined #ruby
CrazyEddy has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
Vile` has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax_ has quit [Ping timeout: 240 seconds]
kies has quit [Ping timeout: 265 seconds]
croberts is now known as sepsis
RougeT430 has quit [Ping timeout: 265 seconds]
troys is now known as troys_
s3nd1v0g1us has joined #ruby
vee__ has quit [Ping timeout: 268 seconds]
JaccoP has joined #ruby
CrazyEddy has quit [Ping timeout: 265 seconds]
milardovich has quit [Remote host closed the connection]
aScottishBoat has quit [Quit: aScottishBoat]
alfiemax has quit [Ping timeout: 256 seconds]
milardovich has joined #ruby
alfiemax has joined #ruby
CrazyEddy has joined #ruby
ur5us has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
dviola has quit [Quit: WeeChat 2.0]
despai has joined #ruby
clemens3 has joined #ruby
vee__ has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
alfiemax has joined #ruby
jaruga has quit [Quit: jaruga]
dviola has joined #ruby
hahuang65 has joined #ruby
jnollette has quit [Remote host closed the connection]
jnollette has joined #ruby
hahuang65 has quit [Ping timeout: 256 seconds]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
CrazyEddy has quit [Ping timeout: 272 seconds]
<jeffreylevesque>
is there an alternate syntax to `to_h`?
cschneid_ has quit [Remote host closed the connection]
<apeiros>
no
CrazyEddy has joined #ruby
<apeiros>
in passing keyword args, there's **. but that's very specific.
<jeffreylevesque>
i'm running `@extensions.map { |s| [s, {}] }.to_h`, and getting " undefined method `to_h' for [["blah1", {}], ["blah2", {}]]:Array"
<apeiros>
sounds like you're using an ancient ruby
<al2o3-cr>
Hash[@extensions.map { |s| [s, {}] }]
<apeiros>
IMO updating ruby is the better choice :D
<apeiros>
also you forgot a *
<apeiros>
Hash[*ary]
dviola has quit [Quit: WeeChat 2.0]
<al2o3-cr>
don't need it in this example.
workmad3 has quit [Ping timeout: 272 seconds]
<apeiros>
oh, no, you're right
<jeffreylevesque>
going to try it thanks
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vee__ has quit [Ping timeout: 256 seconds]
milardov_ has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
reber__ has quit [Remote host closed the connection]
p0p0pr37 has quit [Read error: Connection reset by peer]
p0p0pr37 has joined #ruby
p0p0pr37 has quit [Changing host]
p0p0pr37 has joined #ruby
jobewan has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
m27frogy has joined #ruby
workmad3 has joined #ruby
sameerynho has joined #ruby
vee__ has joined #ruby
claudiuinberlin has joined #ruby
m27frogy has quit [Ping timeout: 272 seconds]
m27frogy has joined #ruby
dviola has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
despai has quit [Quit: ...]
clemens3 has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
m27frogy has quit [Ping timeout: 263 seconds]
ldnunes has quit [Quit: Leaving]
m27frogy has joined #ruby
CrazyEddy has quit [Ping timeout: 264 seconds]
al2o3-cr has quit [Quit: 你变得越安静,你就越能听到]
biox has quit [Quit: probably server crash]
CrazyEddy has joined #ruby
biox has joined #ruby
mtkd has quit [Ping timeout: 265 seconds]
plexigras has quit [Ping timeout: 265 seconds]
mtkd has joined #ruby
al2o3-cr has joined #ruby
amperry has joined #ruby
<amperry>
hi folks, asked this over on #RubyOnRails but I don't know if it's truly rails-specific: I'm getting an error running tests with rspec and FactoryBot, that one of my factories is not registered. Is there a way to find out *why* a factory was not registered?
eckhardt has joined #ruby
mikecmpb_ has joined #ruby
krawchyk has quit [Quit: krawchyk]
Psybur has quit [Ping timeout: 240 seconds]
CrazyEddy has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Read error: No route to host]
orbyt_ has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
troys_ is now known as troys
raynold has joined #ruby
mikecmpb_ has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
<raynold>
ahh it's a wonderful day
cagomez has quit [Remote host closed the connection]
kapil___ has joined #ruby
cagomez has joined #ruby
dviola has left #ruby ["WeeChat 2.0"]
synthroid has quit [Remote host closed the connection]
CrazyEddy has joined #ruby
dviola has joined #ruby
<amperry>
raynold: why do you say that?
cagomez has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
gizmore|3 has joined #ruby
gizmore|2 has joined #ruby
synthroid has joined #ruby
gizmore3 has joined #ruby
pastorinni has joined #ruby
gizmore|4 has joined #ruby
gizmore|3 has quit [Ping timeout: 264 seconds]
vee__ has quit [Ping timeout: 264 seconds]
gizmore has joined #ruby
amperry has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
gizmore|2 has quit [Ping timeout: 264 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore3 has quit [Ping timeout: 272 seconds]
sammi` has quit [Quit: Lost terminal]
gizmore|4 has quit [Ping timeout: 248 seconds]
sammi` has joined #ruby
CrazyEddy has quit [Ping timeout: 265 seconds]
gizmore|2 has joined #ruby
nginxxx has joined #ruby
<nginxxx>
Hello
<nginxxx>
When i write require 'threads' then it says "false"
<nginxxx>
But its installed
<nginxxx>
Successfully installed thread-0.2.2 Parsing documentation for thread-0.2.2 Done installing documentation for thread after 0 seconds 1 gem installed
<nginxxx>
Could someone help me?
<Papierkorb>
nginxxx: require returns true if it wasn't loaded before, and returns false if it was already loaded. If requiring fails, it raises an LoadError.
gizmore|3 has joined #ruby
cagomez has joined #ruby
CrazyEddy has joined #ruby
VladGh has quit [Remote host closed the connection]
VladGh has joined #ruby
gizmore has quit [Ping timeout: 265 seconds]
<nginxxx>
k
nginxxx has quit [Client Quit]
vee__ has joined #ruby
conta1 has joined #ruby
krawchyk has joined #ruby
gizmore|2 has quit [Ping timeout: 268 seconds]
cagomez has quit [Ping timeout: 240 seconds]
conta1 has quit [Client Quit]
gizmore|3 has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
troys is now known as troys_
sameerynho has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Ping timeout: 248 seconds]
VladGh has quit [Remote host closed the connection]
VladGh has joined #ruby
CrazyEddy has quit [Ping timeout: 265 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CrazyEddy has joined #ruby
<mistergibson>
anyone here use ruby-qml?
zacts has quit [Quit: WeeChat 1.9.1]
milardov_ has quit []
zacts has joined #ruby
John___ has joined #ruby
workmad3 has joined #ruby
cagomez has joined #ruby
John__ has quit [Ping timeout: 265 seconds]
rwb-averon has joined #ruby
jenrzzz has joined #ruby
claudiuinberlin has joined #ruby
rwb-averon has quit [Quit: leaving]
vee__ has quit [Ping timeout: 265 seconds]
QualityAddict has joined #ruby
tomphp has joined #ruby
jeffreylevesque_ has joined #ruby
jeffreylevesque has quit [Ping timeout: 255 seconds]
<jeffreylevesque_>
i'm getting "expected ':' in object at '=>{}, "two"=>{},"
<jeffreylevesque_>
i guess i need Hash[] to convert to a json
<jeffreylevesque_>
my code: Hash[@extensions.map { |s| [s, {}] }]
r0ph has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CrazyEddy has joined #ruby
c0dy has quit [Quit: Leaving]
workmad3 has joined #ruby
synthroid has quit []
Mvfc has quit [Read error: Connection reset by peer]
amatas has quit [Quit: amatas]
<tfitts>
I'm wondering if there's a way to have a class that accepts enumerable methods and calls them on a one of the class methods? Right now I have a report_list that is just an array of hashes. I'm trying to convert it to a ReportList class that lets me reload the report and do a few other things. The report list has an array of what are now Report classes that are similar to the hashes but also have a bit more
<tfitts>
functionality. I'm wondering if I can make it so called ReportList.new.each(&:do_something) can call do something on each of the reports, and also so ReportList.new.first will give me the first Report
JaccoP has quit [Quit: Leaving]
k0mpa has joined #ruby
cdolan has quit [Ping timeout: 240 seconds]
neo95 has quit [Ping timeout: 256 seconds]
cdg has quit [Remote host closed the connection]
jeffreylevesque_ has quit [Ping timeout: 272 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
alfiemax has quit [Remote host closed the connection]
neo95 has joined #ruby
<baweaver>
tfitts: delegators mainly, either that or define each on the class as each for the collection and include Enumerable
<baweaver>
SimpleDelegator is the easiest
safetypin has quit [Quit: ZZZzzz…]
<tfitts>
ok, I'll check into that.
Rudolph is now known as Scrooge
polishdub has quit [Quit: leaving]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]