Pipip has quit [Remote host closed the connection]
Cena has joined #ruby
ur5us_ has quit [Remote host closed the connection]
ur5us has joined #ruby
Cena has quit [Ping timeout: 256 seconds]
Guest3952 has quit [Ping timeout: 268 seconds]
TCZ has joined #ruby
TCZ has quit [Quit: Leaving]
TCZ has joined #ruby
TCZ has quit [Quit: Leaving]
bluedust has joined #ruby
Rounin has quit [Ping timeout: 240 seconds]
justAstache has quit [Read error: Connection reset by peer]
justAstache has joined #ruby
donofrio has quit [Ping timeout: 260 seconds]
SteveR has joined #ruby
khole has joined #ruby
khole_ has joined #ruby
khole_ has quit [Remote host closed the connection]
khole has quit [Quit: Leaving]
mooff has quit [Read error: Connection reset by peer]
mooff has joined #ruby
Cena has joined #ruby
Cena has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 272 seconds]
hd1 has joined #ruby
hd1 has left #ruby [#ruby]
howdoi has joined #ruby
teclator has joined #ruby
fef has joined #ruby
SteveR has quit [Ping timeout: 256 seconds]
axisys has quit [Ping timeout: 240 seconds]
apotheon has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
Cena has joined #ruby
Rounin has joined #ruby
Cena has quit [Ping timeout: 240 seconds]
infinityfye has joined #ruby
oxfuxxx has joined #ruby
yuckey2d has quit [Ping timeout: 256 seconds]
oxfuxxx has quit [Ping timeout: 260 seconds]
yuckey2d has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
taupiqueur has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Client Quit]
roadie has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
roadie has quit [Ping timeout: 250 seconds]
TomyWork has joined #ruby
_ht has joined #ruby
roadie has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
Guest3952 has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
bluedust has quit [Remote host closed the connection]
gr33n7007h has quit [Quit: WeeChat 3.4]
bluedust has joined #ruby
gr33n7007h has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Read error: Connection reset by peer]
bluedus__ has joined #ruby
bluedust_ has quit [Ping timeout: 240 seconds]
Tempesta has quit [Read error: Connection reset by peer]
bluedus__ has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust has quit [Ping timeout: 256 seconds]
roadie has joined #ruby
bluedust has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
roadie has joined #ruby
TCZ has joined #ruby
roadie has quit [Client Quit]
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust has quit [Remote host closed the connection]
Aylat has joined #ruby
Aylat has quit [Changing host]
Aylat has joined #ruby
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
Aylat has quit [Read error: Connection reset by peer]
taupiqueur has quit [Ping timeout: 240 seconds]
taupiqueur has joined #ruby
roadie has joined #ruby
Cena has joined #ruby
bluedust has joined #ruby
TCZ has quit [Quit: Leaving]
infinityfye has quit [*.net *.split]
Rounin has quit [*.net *.split]
kapil has quit [*.net *.split]
mooff has quit [*.net *.split]
RedNifre has quit [*.net *.split]
Cork has quit [*.net *.split]
seisatsu has quit [*.net *.split]
foxxx0 has quit [*.net *.split]
depesz has quit [*.net *.split]
cout has quit [*.net *.split]
dstein64 has quit [*.net *.split]
aindilis has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
fcser has quit [*.net *.split]
leftylink has quit [*.net *.split]
Rounin has joined #ruby
kapil has joined #ruby
depesz has joined #ruby
aindilis has joined #ruby
dstein64 has joined #ruby
leftylink has joined #ruby
fcser has joined #ruby
yosafbridge has joined #ruby
Cork has joined #ruby
RedNifre has joined #ruby
mooff has joined #ruby
foxxx0 has joined #ruby
seisatsu has joined #ruby
cout has joined #ruby
yosafbridge has quit [Max SendQ exceeded]
infinityfye has joined #ruby
yosafbridge has joined #ruby
bit4bit has joined #ruby
TCZ has joined #ruby
apotheon has joined #ruby
Tempesta has joined #ruby
gproto23 has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 256 seconds]
bluedust_ has quit [Remote host closed the connection]
oxfuxxx has joined #ruby
bit4bit_ has joined #ruby
bit4bit has quit [Read error: Connection reset by peer]
bit4bit has joined #ruby
bit4bit_ has quit [Read error: Connection reset by peer]
taupiqueur has quit [Remote host closed the connection]
taupiqueur has joined #ruby
taupiqueur has quit [Quit: taupiqueur]
TCZ has quit [Ping timeout: 256 seconds]
bluedust has joined #ruby
bit4bit has quit [Ping timeout: 272 seconds]
infinityfye has quit [Quit: Leaving]
mjacob has quit [Read error: Connection reset by peer]
mjacob has joined #ruby
moo- has joined #ruby
bluedust_ has joined #ruby
moo has quit [Quit: moo]
bluedust has quit [Ping timeout: 260 seconds]
moo- is now known as moo
bluedust has joined #ruby
bluedust_ has quit [Ping timeout: 240 seconds]
<mooff>
you know what'd be interesting..
<adam12>
O_o
<mooff>
def @foo() as a shorthand for def self.foo()
<mooff>
to make it nicer to define singleton methods on module objects
<mooff>
including classes!
mandanguita has joined #ruby
<mandanguita>
I've got a local Gemfile with gem 'rest-client', I've run bundle install and it installed the gem locally in vendor/bundle. I require it in my script but when I run it it says "cannot load such file"
<mandanguita>
Why?
bluedust has quit [Remote host closed the connection]
<mandanguita>
Oh I missed rubygems
<mandanguita>
no that's not the problem
oxfuxxx has quit [Ping timeout: 272 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
mandanguita has quit [Quit: Lost terminal]
oxfuxxx has joined #ruby
bluedust has joined #ruby
bluedust has quit [Remote host closed the connection]
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
justAstache has quit [Ping timeout: 240 seconds]
oxfuxxx has quit [Ping timeout: 250 seconds]
bit4bit has joined #ruby
justAstache has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
Cena has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mooff>
anyone got some design patterns or tricks they like using in Ruby?
<mooff>
e.g., i like the self-extending module: module Foo; extend self; end
oxfuxxx has quit [Ping timeout: 256 seconds]
<kaleido>
I like knowing how very little I actually know about ruby :D
<ox1eef>
mooff: yes, there are some patterns i like and follow - one being, opening classes like 'class Foo::Bar' to avoid nesting indentation.
<leah2>
i try to avoid tricks in my code these days :p
howdoi has joined #ruby
<leah2>
Does class Foo < Struct.new(:foo, :bar)... end count?
<ox1eef>
that's not friendly to hot reloads
<mooff>
yes :D
<mooff>
ox1eef: i was just about to say that
<ox1eef>
Foo = Struct.new(:foo, :bar) # "better"
Cena has joined #ruby
<mooff>
but then that may be problematic if you take a reference to it and then the class the constant points to has changed during a reload
___nick___ has joined #ruby
<ox1eef>
indeed, although probably rare - the constant is usually the reference.
<mooff>
i started writing the irc lib with Struct's, but in three cases i replaced the Struct with just a written out class with accessors and an initialize method
<mooff>
very very quickly afterwards
<ox1eef>
I like Struct as well, but the more attrs the less clear the call to .new is - kw args might help.
<mooff>
initialize_keywords(?) being on by default will help eventually
<ox1eef>
oh it's a feature in waiting?
<mooff>
i remember someone said in here it was becoming the default
gproto23 has quit [Remote host closed the connection]
gproto23 has joined #ruby
ikowasz has joined #ruby
gproto23 has quit [Remote host closed the connection]
ur5us has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Client Quit]
HyLian_ has joined #ruby
HyLian has quit [Ping timeout: 252 seconds]
___nick___ has quit [Ping timeout: 250 seconds]
_ht has quit [Remote host closed the connection]
TomyWork has quit [Quit: Leaving]
orbyt has joined #ruby
FetidToot4 has joined #ruby
FetidToot has quit [Ping timeout: 260 seconds]
FetidToot has joined #ruby
Cena has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FetidToot4 has quit [Ping timeout: 250 seconds]
davidw has joined #ruby
<davidw>
Hi - I'm perusing ObjectSpace.each_object(Class) what's the difference between Foo::Bar and #<Foo::Bar> ? The latter is some kind of instance? How can I distinguish them programmatically?
howdoi has quit [Quit: Connection closed for inactivity]
Cena has joined #ruby
mooff has quit [Quit: Ping timeout (120 seconds)]
Artea has quit [Ping timeout: 245 seconds]
mooff has joined #ruby
greyrat_ has quit [Ping timeout: 240 seconds]
Artea has joined #ruby
greyrat has joined #ruby
In0perable has joined #ruby
Inoperable has quit [Ping timeout: 272 seconds]
orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ox1eef>
davidw: the latter looks like a singleton class of Foo::Bar
<ox1eef>
looks like there's singleton_class? method you can use to distinguish between them.
<davidw>
ox1eef, right... so how do I tell and filter them out? Ultimate goal here is to sort through everything that's loaded and find some classes with a name like Foo::Bar::Bee::Bop - and find all the Bop classes loaded
<ox1eef>
with the singleton_class? method.
<davidw>
aha, I didn't see that one in the docs I was looking at. Perfect, thanks!