weaksauce has quit [Read error: Connection reset by peer]
marius has quit [Quit: Ping timeout (120 seconds)]
marius has joined #ruby
rikai has quit [Quit: No Ping reply in 180 seconds.]
rikai has joined #ruby
cdg has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
cdg has quit [Ping timeout: 276 seconds]
kies has quit [Ping timeout: 268 seconds]
shuforov has joined #ruby
ramfjord has joined #ruby
gnufied has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
kies has joined #ruby
newguy8822 has joined #ruby
<newguy8822>
hi guys how do i install a ruby gem?
<havenwood>
newguy8822: gem install
<newguy8822>
in the cmd or irb?
<havenwood>
newguy8822: command line
<newguy8822>
thanks
<havenwood>
newguy8822: in irb you can shell out if you want with backticks: `gem install hola`
<havenwood>
newguy8822: no prob
<havenwood>
or in pry you can use the `gem-install` command to both install then require the gem: gem-install hola
<havenwood>
?pry
<ruby[bot]>
Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
Dimik has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 276 seconds]
<newguy8822>
i installed nokogiri but cant require it, does anyone know what went wrong? C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- nokogiri (LoadError)
<havenwood>
newguy8822: What do you get for?: gem which nokogiri
<newguy8822>
it works now thanks
sundhell_away is now known as sundhell
<newguy8822>
is this a windows bug? 'make' is not recognized as an internal or external command, operable program or batch file.
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
shuforov has quit [Ping timeout: 276 seconds]
sauvin_ has joined #ruby
shuforov has joined #ruby
arkymad has joined #ruby
mojtaba has quit [Ping timeout: 240 seconds]
anisha_ has joined #ruby
za1b1tsu has joined #ruby
shuforov has quit [Ping timeout: 276 seconds]
<PixeLInc>
A windows bug? No lol. You have to manually install make on Windows
jenrzzz has quit [Ping timeout: 260 seconds]
eckhardt has joined #ruby
<b100s>
havenwood, thanks: ) by the way, is it possible to get source IP of request ?
milardovich has quit [Remote host closed the connection]
newguy8822 has quit [Quit: Page closed]
arkymad has quit [Ping timeout: 240 seconds]
arkymad has joined #ruby
sidx64 has joined #ruby
sidx64 has quit [Client Quit]
workmad3 has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
reber has joined #ruby
jamesaxl has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
Xiti` has joined #ruby
Xiti has quit [Ping timeout: 268 seconds]
sidx64 has joined #ruby
arkymad has quit [Ping timeout: 246 seconds]
za1b1tsu has quit [Remote host closed the connection]
arkymad has joined #ruby
karapetyan has joined #ruby
za1b1tsu has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has quit [Remote host closed the connection]
pavelz has joined #ruby
shuforov has joined #ruby
za1b1tsu has joined #ruby
jcarl43 has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
<schneider>
I have this small script, and whenever I run "./foo.rb crud create" the documentation shows all the commands omiting "crud" in the first place
<schneider>
instead of showing "./foo.rb crud create file # Creating a file" it shows me "./foo.rb create file # Creating a file"
<schneider>
I'm doing something wrong here?
Burgestrand has joined #ruby
shuforov has quit [Ping timeout: 246 seconds]
tomphp has joined #ruby
gnufied has joined #ruby
Mia has joined #ruby
Axy has quit [Ping timeout: 248 seconds]
Sina has joined #ruby
tvw has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has quit [Read error: Connection reset by peer]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 264 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
psychicist__ has joined #ruby
pavelz has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby
shuforov has joined #ruby
roshanavand has joined #ruby
conta has quit [Ping timeout: 264 seconds]
dr3w_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shpoont has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
duckpuppy has joined #ruby
tomphp has joined #ruby
conta has joined #ruby
tcopeland has quit [Quit: tcopeland]
shuforov has quit [Ping timeout: 240 seconds]
RougeT430 has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
Mia has joined #ruby
Axy has quit [Ping timeout: 264 seconds]
conta has quit [Ping timeout: 276 seconds]
psychicist__ has quit [Ping timeout: 256 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has quit [Ping timeout: 240 seconds]
nowhere_man has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
mojtaba has joined #ruby
tomphp has joined #ruby
mojtaba has quit [Ping timeout: 240 seconds]
shuforov has joined #ruby
RougeT430 has joined #ruby
AJA4350 has joined #ruby
ferr has joined #ruby
conta has joined #ruby
Mosselman has quit [Ping timeout: 260 seconds]
ferr has left #ruby ["WeeChat 2.1"]
Mosselman has joined #ruby
arkymad has joined #ruby
mojtaba has joined #ruby
theRoUS has joined #ruby
alfiemax has quit [Remote host closed the connection]
arekushi has quit [Ping timeout: 240 seconds]
theRoUS has quit [Changing host]
theRoUS has joined #ruby
suukim has quit [Quit: Konversation terminated!]
dr3w_ has joined #ruby
dviola has joined #ruby
Mosselman has quit [Ping timeout: 264 seconds]
arkymad has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mia has quit [Ping timeout: 246 seconds]
arkymad has joined #ruby
noobineer has joined #ruby
dr3w_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arkymad has quit [Ping timeout: 264 seconds]
noobineer has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
Cavallari has joined #ruby
Cavallari1 has joined #ruby
james__ has quit [Quit: This computer has gone to sleep]
Mia has joined #ruby
arkymad has joined #ruby
Cavallari has quit [Ping timeout: 260 seconds]
Cavallari1 is now known as Cavallari
synthroid has joined #ruby
roshanavand has joined #ruby
rshetty has joined #ruby
amatas has joined #ruby
anisha_ has quit [Read error: Connection reset by peer]
tcopeland has joined #ruby
jcalla has joined #ruby
Mosselman has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amatas has quit [Quit: amatas]
tomphp has joined #ruby
anisha_ has joined #ruby
psychicist__ has joined #ruby
tomphp has quit [Client Quit]
Burgestrand has quit [Quit: Closing time!]
Mosselman has quit [Ping timeout: 240 seconds]
FactorBrY has joined #ruby
rshetty has quit [Remote host closed the connection]
shuforov has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
amelliaa has joined #ruby
bmurt has joined #ruby
karapetyan has quit [Remote host closed the connection]
cdg has joined #ruby
alfiemax has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
shuforov has joined #ruby
Mosselman has joined #ruby
gnufied has quit [Ping timeout: 264 seconds]
aotg has joined #ruby
RougeT430 has quit [Ping timeout: 260 seconds]
<Mike11>
why would one use send() instead of calling the member function directly?
<z64>
send bypasses protection; it can be used to call private methods on a class
<Mike11>
is this just about bypassing member access specifiers?
<z64>
that is one use
<Mike11>
z64: I can not think of anything else
<z64>
its used often in metaprogramming concepts in ruby
<z64>
where some other code might generate the name of the method to be called
<Mike11>
aha, makes sense here...
<Mike11>
thanks :)
<z64>
you can get pretty creative with it. it can also cause some nasty bugs if you're not careful. no problem
jecht has joined #ruby
roshanavand has quit [Remote host closed the connection]
arkymad has quit [Ping timeout: 260 seconds]
jimmylu2333-fedo has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
arkymad has joined #ruby
RougeT430 has joined #ruby
jecht has quit [Read error: Connection reset by peer]
jecht has joined #ruby
mojtaba has quit [Quit: Leaving.]
<ineb>
Mike11: also sometimes seen in unit tests
<Mike11>
ineb: interesting, so why not call the method directly there?
<ineb>
for ignoring that it is private ^^
shuforov has quit [Ping timeout: 256 seconds]
<Mike11>
oh, ok :)
<ineb>
but there is also public_send which will respect the visibility of methods again
za1b1tsu has joined #ruby
<ineb>
besides its use in metaprogramming and maybe unit testing, send makes the concept of oop programming clear where messages are 'send' to objects
suukim has joined #ruby
<ineb>
but you are right that a member function should be called directly whenever possible
<dminuoso>
13:45 z64 | its used often in metaprogramming concepts in ruby
<dminuoso>
z64: In almost all cases that equates to shoehorning, not techniques.
tomphp has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
Azure has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
sundhell is now known as sundhell_away
Azure has joined #ruby
DTZUZO has joined #ruby
shuforov has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
gnufied has joined #ruby
alfiemax has joined #ruby
yuanyua has quit [Quit: Leaving]
mojtaba has joined #ruby
rippa has joined #ruby
karapetyan has joined #ruby
mojtaba has quit [Ping timeout: 264 seconds]
kn-928 has joined #ruby
tcopeland has quit [Quit: tcopeland]
karapetyan has quit [Ping timeout: 276 seconds]
gnufied has quit [Quit: Leaving]
gnufied has joined #ruby
alfiemax has quit [Remote host closed the connection]
pd has joined #ruby
pd is now known as Guest23678
tcopeland has joined #ruby
Guest23678 has quit [Remote host closed the connection]
sundhell_away is now known as sundhell
oleo has joined #ruby
mojtaba has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
mrtAkdeniz has joined #ruby
<mrtAkdeniz>
hey there
alfiemax_ has joined #ruby
<mrtAkdeniz>
guys, I'm so noob on ruby, and just working for little things where bash is not enough...
<havenwood>
cagomez: There's no traversing the namespaces. Just top level or current level.
mojtaba has joined #ruby
harrycs has joined #ruby
venmx has joined #ruby
jeecht has joined #ruby
mojtaba has quit [Ping timeout: 256 seconds]
rippa has quit [Ping timeout: 260 seconds]
jrabe has quit [Ping timeout: 252 seconds]
jokester has quit [Ping timeout: 246 seconds]
<cagomez>
havenwood: If I have classes like Foo::A::Components::Wheel, Foo::A::Components::Door, is there a way to make these constants available in Foo::A::Factory ? using Components.const_get() sometimes finds classes in my app/models folder
<apeiros>
havenwood: that's not quite correct.
<havenwood>
apeiros: I felt bad after saying it. ;-P
jecht has quit [Ping timeout: 240 seconds]
<havenwood>
I'm too distracted this morning. More coffee!!
<ruby[bot]>
apeiros: # => /tmp/execpad-51b07dd1a6af/source-51b07dd1a6af:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/977667)
<apeiros>
grah
<cagomez>
I'm trying to get my Factory to find the constants defined in Foo::A first and not have to reach the "top level"
<apeiros>
in the latter, I would not be able to resolve A::X via just X within C
harrycs has quit [Remote host closed the connection]
jrabe has joined #ruby
harrycs has joined #ruby
<apeiros>
dminuoso last time said I was incorrect about Module.nesting but I forgot what his amendment was :-/
<apeiros>
it should at the very least be *mostly* correct :D
jenrzzz has quit [Ping timeout: 264 seconds]
jokester has joined #ruby
orbyt_ has joined #ruby
jenrzzz has joined #ruby
desperek has joined #ruby
karapetyan has joined #ruby
harrycs has quit [Remote host closed the connection]
harrycs has joined #ruby
yohji has quit [Remote host closed the connection]
dionysus69 has quit [Quit: dionysus69]
harrycs has quit [Remote host closed the connection]
harrycs has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
n008f4g_ has joined #ruby
jeecht is now known as jecht
harrycs has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
harrycs has joined #ruby
<dminuoso>
apeiros: Oh I just said that nesting in detail is modified in a stack machine at runtime, so it's not a syntax thing.
p4tch3s has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
<dminuoso>
For most cases the distinction is not useful.
mojtaba has joined #ruby
jecht has quit [Remote host closed the connection]
jecht has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* dminuoso
should stop being a pedantric hairsplitter
KeyJoo has joined #ruby
rippa has joined #ruby
harrycs has quit [Remote host closed the connection]
harrycs has joined #ruby
raul782 has joined #ruby
ski7777 has joined #ruby
mfaeh has quit []
c0dec has quit [Quit: Lost terminal]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
venmx has quit [Ping timeout: 240 seconds]
harrycs has quit [Remote host closed the connection]
harrycs has joined #ruby
bmurt has joined #ruby
n0m4d1c has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
alfiemax has quit [Remote host closed the connection]
harrycs has quit [Remote host closed the connection]
harrycs has joined #ruby
Puffball has quit [Remote host closed the connection]
harrycs has quit [Remote host closed the connection]
harrycs has joined #ruby
jrafanie has joined #ruby
ski7777 has quit [Read error: Connection reset by peer]
ski4x7 has joined #ruby
raul782 has quit []
Nicholai has joined #ruby
<cagomez>
I have a Module Recipient, Class Factory. Is it bad form to have Module Recipient with Module Factory nested inside, and then have an anonymous class inside Factory?
Puffball has joined #ruby
amelliaa has joined #ruby
Puffball has quit [Remote host closed the connection]
<havenwood>
cagomez: See if you can make the whole thing simpler. Try the simplest thing that can possibly work and see how that feels.
ski4x7 has quit [Client Quit]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cagomez>
my issue is that Users::Getters.const_get(:GoodUser) will find the class in my app/models folder. Will placing the "getters" in the same root directory as factory.rb cause those constants to be defined when Factory is ran?
harrycs has quit [Remote host closed the connection]
harrycs has joined #ruby
r2 has quit [Ping timeout: 240 seconds]
harrycs has quit [Remote host closed the connection]
harrycs has joined #ruby
n0m4d1c_ has joined #ruby
cthulchu has joined #ruby
WhereIsMySpoon has joined #ruby
WhereIsMySpoon has joined #ruby
WhereIsMySpoon has quit [Changing host]
tcopeland has quit [Quit: tcopeland]
alfiemax has joined #ruby
howdoi has joined #ruby
n0m4d1c has quit [Ping timeout: 240 seconds]
tcopeland has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cthulchu_ has quit [Ping timeout: 256 seconds]
harrycs has quit [Ping timeout: 240 seconds]
n008f4g_ has quit [Ping timeout: 276 seconds]
ryzokuken has joined #ruby
harrycs has joined #ruby
clemens3 has joined #ruby
harrycs has quit [Remote host closed the connection]
harrycs has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
DTZUZU has quit [Quit: WeeChat 1.9]
lytol has quit [Remote host closed the connection]
tcopeland has quit [Quit: tcopeland]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
desperek has quit [Remote host closed the connection]
ramfjord has joined #ruby
desperek has joined #ruby
DTZUZU has joined #ruby
jecht has quit [Remote host closed the connection]
John_Ivan has quit [Ping timeout: 264 seconds]
jecht has joined #ruby
r2 has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
aroaminggeek has joined #ruby
anisha_ has quit [Quit: This computer has gone to sleep]
mtkd has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
sagax_ has joined #ruby
jenrzzz has joined #ruby
harrycs has quit [Ping timeout: 240 seconds]
cdg_ has joined #ruby
bmurt has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cthulchu_ has joined #ruby
cdg has quit [Ping timeout: 264 seconds]
cthulchu has quit [Ping timeout: 264 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has quit [Client Quit]
tvw has joined #ruby
shuforov has joined #ruby
ldepandis has joined #ruby
Dimik has joined #ruby
karapetyan has joined #ruby
desperek has quit [Remote host closed the connection]
desperek has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
tcopeland has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rawste has joined #ruby
n0m4d1c_ has quit [Remote host closed the connection]
tcopeland has quit [Client Quit]
agent_white has joined #ruby
jrafanie has joined #ruby
sagax_ is now known as sagax
n0m4d1c has joined #ruby
mtkd has quit []
ramfjord has quit [Ping timeout: 264 seconds]
Axy has joined #ruby
cthulchu has joined #ruby
sameerynho has joined #ruby
Mia has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
cthulchu_ has quit [Ping timeout: 264 seconds]
leotaku has quit [Ping timeout: 268 seconds]
RougeT430 has quit [Ping timeout: 264 seconds]
tcopeland has joined #ruby
alfiemax has quit [Remote host closed the connection]
leotaku has joined #ruby
sameerynho has quit [Ping timeout: 256 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
n0m4d1c has quit [Remote host closed the connection]
alfiemax has joined #ruby
mtkd has joined #ruby
bmurt has joined #ruby
mostlybadfly has joined #ruby
RougeT430 has joined #ruby
psychicist__ has joined #ruby
raynold has joined #ruby
ta_ has quit [Remote host closed the connection]
roshanavand has joined #ruby
guanine has quit [Quit: byebye]
alfiemax has quit [Remote host closed the connection]
jottr has joined #ruby
tcopeland has quit [Quit: tcopeland]
alfiemax has joined #ruby
cagomez has quit [Remote host closed the connection]
_codepoet has quit [Quit: _codepoet]
cagomez has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has quit [Client Quit]
jottr has quit [Ping timeout: 276 seconds]
Mitaka89 has joined #ruby
Mitaka89 has quit [Max SendQ exceeded]
roshanavand has quit [Remote host closed the connection]
n0m4d1c has joined #ruby
Mitaka89 has joined #ruby
Mitaka89 has quit [Max SendQ exceeded]
jottr has joined #ruby
ta_ has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
tcopeland has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
harrycs has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
mtkd has quit []
konsolebox has quit [Ping timeout: 264 seconds]
konsolebox has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
_codepoet has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jottr has joined #ruby
psychicist__ has quit [Ping timeout: 240 seconds]
dviola has quit [Quit: WeeChat 2.1]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardov_ has joined #ruby
shuforov has quit [Ping timeout: 268 seconds]
psychicist__ has joined #ruby
cagomez has joined #ruby
mtkd has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
milardovich has quit [Ping timeout: 240 seconds]
shuforov has joined #ruby
pastorinni has quit [Ping timeout: 268 seconds]
cagomez has quit [Ping timeout: 268 seconds]
hinbody has quit [Quit: leaving]
banisterfiend has joined #ruby
tomphp has joined #ruby
suukim has quit [Quit: Konversation terminated!]
hinbody has joined #ruby
jottr has joined #ruby
mojtaba has quit [Quit: Leaving.]
cagomez has joined #ruby
nowhere_man has joined #ruby
eckhardt has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
ta_ has quit [Remote host closed the connection]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
jecht has quit [Remote host closed the connection]
cagomez has quit [Remote host closed the connection]
ta_ has joined #ruby
jecht has joined #ruby
cagomez has joined #ruby
cagomez has quit [Read error: Connection reset by peer]
n0m4d1c has quit [Remote host closed the connection]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoul_ has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit []
banisterfiend has joined #ruby
_codepoet has quit [Quit: _codepoet]
ramfjord has joined #ruby
jecht has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 264 seconds]
tolerablyjake has joined #ruby
_codepoet has joined #ruby
eckhardt has joined #ruby
sidx64 has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
dr3w_ has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
eckhardt has quit [Client Quit]
eckhardt has joined #ruby
reber has quit [Quit: Leaving]
jnollette has quit [Remote host closed the connection]
jeffreylevesque has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
phenom has quit [Ping timeout: 256 seconds]
phenom has joined #ruby
harrycs has quit [Ping timeout: 268 seconds]
dr3w__ has joined #ruby
synthroi_ has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
jeffreylevesque has joined #ruby
dr3w_ has quit [Ping timeout: 264 seconds]
dr3w__ has quit [Read error: Connection reset by peer]
ldnunes has quit [Quit: Leaving]
mojtaba has joined #ruby
synthroid has quit [Ping timeout: 264 seconds]
chouhoul_ has joined #ruby
claudiuinberlin has joined #ruby
za1b1tsu has quit [Quit: Leaving]
mtkd has quit []
dr3w_ has joined #ruby
mrBen2k2k2k__ has quit [Ping timeout: 256 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
mojtaba has quit [Ping timeout: 263 seconds]
chouhoul_ has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
coderphive has quit [Quit: coderphive]
r2 has quit [Ping timeout: 264 seconds]
mtkd has joined #ruby
tomphp has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
duckpuppy has quit [Ping timeout: 276 seconds]
tdy has joined #ruby
jrabe has quit [Quit: Disconnected]
WhereIsMySpoon has quit [Ping timeout: 240 seconds]
tcopeland has quit [Quit: tcopeland]
KeyJoo has quit [Ping timeout: 246 seconds]
jrabe has joined #ruby
sammi` has quit [Quit: Lost terminal]
sammi` has joined #ruby
mojtaba has joined #ruby
sanscoeu_ has joined #ruby
minimalism has quit [Quit: minimalism]
cagomez has joined #ruby
chamunks has quit [Ping timeout: 240 seconds]
p4tch3s has joined #ruby
sidx64_ has quit [Ping timeout: 260 seconds]
sanscoeur has quit [Ping timeout: 268 seconds]
gnufied has quit [Ping timeout: 248 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zaab1t has joined #ruby
milardov_ has quit [Remote host closed the connection]
<cagomez>
I have classes in a module that map to classes in my app/models. Eg GoodUser model -> MyModule::GoodUserUtil. I have a MyModule::Factory. Is there a way of "selecting" the correct class in my module?
chamunks has joined #ruby
synthroi_ has quit []
minimalism has joined #ruby
alfiemax has joined #ruby
<apeiros>
cagomez: I don't understand what you're looking for. can you make a minimal example which would work except for the "selecting" part?
tomphp has joined #ruby
mikecmpbll has joined #ruby
rsh has quit [Ping timeout: 240 seconds]
OrangeFlash81 has joined #ruby
<cagomez>
apeiros: https://hastebin.com/afuneruhew.rb . so I have a factory that uses a case statement, based on the class of my User, to initialize a Util class
<OrangeFlash81>
Hello all, does anybody know if there's a gem which I can use to interact with TWAIN scanners?
ski7777 has joined #ruby
r2 has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
<apeiros>
cagomez: and which part of this paste illustrates your problem?
<cagomez>
apeiros: Instead of this case statement, I'd like another approach. I'm trying to avoid adding a method to each of my models, like `def do_something; GoodUserUtil.call; end` on my GoodUser model
Quentinius has joined #ruby
<apeiros>
cagomez: you still seem to leave away a lot of information (maybe you consider it as self-evident?)
venmx has quit [Remote host closed the connection]
<apeiros>
f.ex. what qualifies a class as "the correct class"?
Quentinius has quit [Client Quit]
dr3w_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
OrangeFlash81 has quit [Quit: Page closed]
r2 has quit [Ping timeout: 276 seconds]
alfiemax has joined #ruby
sanscoeu_ has quit [Remote host closed the connection]
sanscoeur has joined #ruby
_codepoet has quit [Quit: _codepoet]
sanscoeu_ has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
n0m4d1c has joined #ruby
<ramfjord>
cagomez: I'm also not sure exactly what you're trying to do, but if you just want the names to match up (a la rails) you can consider calling #to_s on your class/module, modifying the string, and getting a constant back out of it with Module#const-get (https://ruby-doc.org/core-2.1.0/Module.html#method-i-const_get)
sanscoeur has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: inabit. zz.]
<ramfjord>
this is assuming that you can get the correct class programatically from the name of the module, or vice versa
<ramfjord>
this still doesn't sound like a super clean way of doing things though
<dminuoso>
cagomez: ?xy
<dminuoso>
?xy cagomez
<ruby[bot]>
cagomez: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
AndBobsYourUncle has joined #ruby
<zenspider>
rawr
n008f4g_ has joined #ruby
alex`` has quit [Quit: WeeChat 2.0.1]
<dminuoso>
\o/ zenspider
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
riotjones has quit [Ping timeout: 240 seconds]
mtkd has quit []
ta_ has joined #ruby
ryzokuken has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
sanscoeu_ has quit [Remote host closed the connection]