sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davispuh has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
djbkd_ has joined #ruby-lang
Steve_Jobs has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby-lang
Steve_Jobs has joined #ruby-lang
djbkd has quit [Ping timeout: 248 seconds]
charliesome has quit [Quit: zzz]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
djellemah has quit [Ping timeout: 272 seconds]
djellemah has joined #ruby-lang
havenwood has joined #ruby-lang
loincloth has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
cornerma1 has joined #ruby-lang
loincloth has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby-lang
cornerman has quit [Ping timeout: 255 seconds]
cornerma1 is now known as cornerman
ruby-lang834 has joined #ruby-lang
gix has quit [Ping timeout: 248 seconds]
kickr has joined #ruby-lang
gix has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
Miphix has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 1.1.1]
centrx has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
car has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 250 seconds]
lektrik has joined #ruby-lang
lektrik has quit [Max SendQ exceeded]
lektrik has joined #ruby-lang
kickr has quit [Quit: Be back later ...]
<ruby-lang834>
Is there a way to take a block, capture its code for later with string interpolation, and then instance_eval it at a later time? (ruby 2.2) Any suggestions greatly appreciated https://gist.github.com/activefx/5460d9236ba0ba7f1800
fujimura has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
kickr has joined #ruby-lang
nofxx has quit [Ping timeout: 264 seconds]
kickr has quit [Ping timeout: 250 seconds]
tsujp has joined #ruby-lang
loincloth has joined #ruby-lang
carldmitch has joined #ruby-lang
loincloth has quit [Ping timeout: 244 seconds]
netShadow has joined #ruby-lang
roobnoob has quit [Ping timeout: 244 seconds]
Swappticon has quit [Ping timeout: 255 seconds]
robbyoconnor has quit [Ping timeout: 272 seconds]
robbyoconnor has joined #ruby-lang
cpt_yossarian has quit [Ping timeout: 250 seconds]
<womble`>
ruby-lang834: Why would you use string interpolation when you've already got a block?
* womble`
reads the gist
yfeldblum has joined #ruby-lang
netShadow has quit [Quit: netShadow]
seank___ has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
cpt_yossarian has joined #ruby-lang
nofxx has joined #ruby-lang
fujimura has joined #ruby-lang
<ruby-lang834>
womble: Thanks for taking a look. The example I posted was meant to be trivial. Here's the code that I'm working on: https://gist.github.com/activefx/cb5da877014d40b4702d I've temporarily solved the problem by including a module, setting class variables on the module that reference the blocks, and then referencing those class variables within the interpolated text
fujimura has quit [Read error: No route to host]
LMity has joined #ruby-lang
seank_ has joined #ruby-lang
fujimura has joined #ruby-lang
LMity has quit [Ping timeout: 256 seconds]
tropikan4 has joined #ruby-lang
gwendall_ has quit [Remote host closed the connection]
tropikan4 has left #ruby-lang [#ruby-lang]
lektrik has quit [Ping timeout: 256 seconds]
tropikan4 has joined #ruby-lang
djbkd_ has quit [Quit: Leaving...]
tropikan4 has quit [Client Quit]
centrx has quit [Quit: Shutting down, Please wait...]
rbowlby has joined #ruby-lang
symm- has joined #ruby-lang
tharindu has joined #ruby-lang
symm- has quit [Quit: Leaving...]
<womble>
ruby-lang834: I still don't get why you wouldn't just use define_method
tharindu has quit [Ping timeout: 255 seconds]
roobnoob has joined #ruby-lang
roobnoob has left #ruby-lang [#ruby-lang]
wut has joined #ruby-lang
shinnya has joined #ruby-lang
<ruby-lang834>
womble: I will probably end up going back that way. I wanted the DSL contained in modules at the top of the inheritance hierarchy, and this method provided for easier overrides.
wut has quit [Client Quit]
chinmay_dd has joined #ruby-lang
charliesome has quit [Quit: zzz]
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby-lang
rbowlby has quit []
hahuang65 has quit [Ping timeout: 264 seconds]
caseydriscoll has joined #ruby-lang
rippa has joined #ruby-lang
skade has joined #ruby-lang
QuintinAdam has quit [Ping timeout: 252 seconds]
ruby-lang834 has quit [Ping timeout: 246 seconds]
SylarRuby has joined #ruby-lang
dellavg_ has joined #ruby-lang
_kfpratt has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
haraoka has joined #ruby-lang
Zen-Zen has joined #ruby-lang
stardiviner has quit [Ping timeout: 244 seconds]
iliketurtles has quit [Remote host closed the connection]
<Zen-Zen>
hello ruby-lang... I opened a Github and posted my first Gist. Now I have a question for the smarties in here...
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
awar has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
micmus has quit [Ping timeout: 248 seconds]
skade has quit [Quit: Computer has gone to sleep.]
fujimura has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
sarkyniin has joined #ruby-lang
awar has quit [Ping timeout: 256 seconds]
djbkd has joined #ruby-lang
red_horned_rihno has quit [Ping timeout: 246 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apt-get_ has joined #ruby-lang
djbkd has quit [Ping timeout: 252 seconds]
sarkyniin has quit [Ping timeout: 252 seconds]
gwendall has joined #ruby-lang
skade has joined #ruby-lang
red_horned_rihno has joined #ruby-lang
hahuang65 has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
AlexAltea has joined #ruby-lang
sankaber has joined #ruby-lang
hahuang65 has quit [Ping timeout: 264 seconds]
banister has joined #ruby-lang
sankaber has quit [Client Quit]
wicope has quit [Read error: Connection reset by peer]
micmus has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
relix has joined #ruby-lang
relix has quit [Client Quit]
ledestin has joined #ruby-lang
relix has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
Cocoabean has joined #ruby-lang
haraoka has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
SylarRuby has quit []
LMity has joined #ruby-lang
skade has joined #ruby-lang
chinmay_dd has quit [Quit: Leaving]
havenwood has quit [Remote host closed the connection]
symm- has joined #ruby-lang
Cocoabean has quit []
Cocoabean has joined #ruby-lang
Cocoabean has quit [Client Quit]
Cocoabean has joined #ruby-lang
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GBrawl has joined #ruby-lang
Cocoabean has left #ruby-lang [#ruby-lang]
Cocoabean has joined #ruby-lang
Cocoabean has quit [Client Quit]
Cocoabean has joined #ruby-lang
Cocoabean has quit [Client Quit]
Cocoabean has joined #ruby-lang
Cocoabean has left #ruby-lang [#ruby-lang]
LMity has quit [Ping timeout: 246 seconds]
red_horned_rihno has quit [Ping timeout: 256 seconds]
fusillicode has quit [Read error: No route to host]
fusillicode has joined #ruby-lang
riotjones has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
micmus has quit [Ping timeout: 252 seconds]
riotjones has quit [Ping timeout: 255 seconds]
nedp_ has quit [Remote host closed the connection]
red_horned_rihno has joined #ruby-lang
caseydriscoll has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CatMartyn has joined #ruby-lang
caseydriscoll has quit [Ping timeout: 246 seconds]
apt-get_ has quit [Quit: Quit]
ur5us has joined #ruby-lang
dellavg_ has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby-lang
ur5us has quit [Ping timeout: 250 seconds]
hahuang65 has quit [Ping timeout: 252 seconds]
amystephen has joined #ruby-lang
relix has joined #ruby-lang
GBrawl has quit [Quit: (null)]
tsujp has quit [Quit: tsujp is snoozing]
Mark-6ma has quit [Quit: -]
piotrj has joined #ruby-lang
sarkyniin has joined #ruby-lang
jgpawletko has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
micmus has joined #ruby-lang
jgpawletko has quit [Quit: jgpawletko]
sarkyniin has quit [Ping timeout: 250 seconds]
centrx has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
skade has joined #ruby-lang
rikkipitt has joined #ruby-lang
sarkyniin has joined #ruby-lang
wicope has joined #ruby-lang
enebo has joined #ruby-lang
caseydriscoll has joined #ruby-lang
hahuang65 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 244 seconds]
caseydriscoll has quit [Remote host closed the connection]
caseydriscoll has joined #ruby-lang
fusillicode1 has joined #ruby-lang
fusillicode has quit [Ping timeout: 250 seconds]
Forgetful_Lion has quit [Remote host closed the connection]
zekriad has joined #ruby-lang
red_horned_rihno has quit [Quit: Leaving]
fusillicode has joined #ruby-lang
red_horned_rihno has joined #ruby-lang
piotrj has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
tsujp has joined #ruby-lang
fusillicode2 has joined #ruby-lang
fusillicode1 has quit [Read error: Connection reset by peer]
fusillicode has quit [Ping timeout: 272 seconds]
seank_ has quit [Remote host closed the connection]
semperfried76 has quit [Quit: Be back later ...]
fusillicode has joined #ruby-lang
fusillicode2 has quit [Ping timeout: 250 seconds]
caseydriscoll has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
gix has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby-lang
riotjones has joined #ruby-lang
gix has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
riotjones has quit [Ping timeout: 265 seconds]
fusillicode1 has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
carldmitch has quit [Quit: Leaving.]
carldmitch has joined #ruby-lang
fusillicode has quit [Ping timeout: 252 seconds]
enebo has quit [Quit: enebo]
CatMartyn has quit [Ping timeout: 265 seconds]
gwendall has joined #ruby-lang
bantic has joined #ruby-lang
|jemc| has joined #ruby-lang
kfpratt has quit [Read error: Connection reset by peer]
kfpratt has joined #ruby-lang
|jemc| has quit [Client Quit]
skade has joined #ruby-lang
bruno- has quit [Ping timeout: 272 seconds]
|jemc| has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
cornerma1 has joined #ruby-lang
drewdavis has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 256 seconds]
drewdavis has joined #ruby-lang
cornerman has quit [Ping timeout: 252 seconds]
cornerma1 is now known as cornerman
hahuang65 has quit [Ping timeout: 252 seconds]
|jemc| has quit [Quit: WeeChat 1.1.1]
piotrj has joined #ruby-lang
caseydriscoll has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
mcclurmc has joined #ruby-lang
QuintinAdam has joined #ruby-lang
caseydriscoll has quit [Ping timeout: 272 seconds]
gwendall has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby-lang
chinmay_dd has joined #ruby-lang
QuintinAdam has quit [Ping timeout: 265 seconds]
b_hoffman has joined #ruby-lang
chinmay_dd has quit [Quit: Leaving]
gwendall has joined #ruby-lang
amclain has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bantic has quit [Quit: bantic]
bantic has joined #ruby-lang
amclain has quit [Read error: Connection reset by peer]
rikkipitt has quit [Remote host closed the connection]
kstuart has quit [Quit: WeeChat 1.1.1]
leat has joined #ruby-lang
duderonomy has joined #ruby-lang
amclain has joined #ruby-lang
yxhuvvd has joined #ruby-lang
yxhuvud has quit [Read error: Connection reset by peer]
piotrj has quit [Remote host closed the connection]
piotrj has joined #ruby-lang
centrx has quit [Quit: Shutting down, Please wait...]
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
Missphoenix has joined #ruby-lang
Miphix has quit [Ping timeout: 265 seconds]
bantic has quit [Quit: bantic]
hahuang65 has joined #ruby-lang
QuintinAdam has joined #ruby-lang
QuintinAdam has quit [Max SendQ exceeded]
seank_ has joined #ruby-lang
QuintinAdam has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 264 seconds]
piotrj has joined #ruby-lang
roamingdog has joined #ruby-lang
LMity has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
<nofxx>
If I have a class inherited from array (CoolArray < Array) to convert plain arrays to my class anything better than/wrong with CoolArray.new(obj) ?
piotrj has quit [Remote host closed the connection]
red_horned_rihno has quit [Ping timeout: 272 seconds]
<apeiros>
nofxx: looks fine
<apeiros>
nofxx: beware, though, subclassing a class you don't own is IMO a code smell. better use composition instead of inheritance.
piotrj has joined #ruby-lang
rikkipitt has joined #ruby-lang
<nofxx>
apeiros, thank you. In this particular case there's no overwriting, only some methods additions, don't look so bad
LMity has quit [Ping timeout: 265 seconds]
inavle has joined #ruby-lang
<apeiros>
nofxx: well, one problem you face is that e.g. CoolArray#select will return Array, not CoolArray
roamingdog has quit [Remote host closed the connection]
semperfried76 has joined #ruby-lang
QuintinAdam has quit []
bantic has joined #ruby-lang
red_horned_rihno has joined #ruby-lang
ledestin has joined #ruby-lang
<nofxx>
apeiros, I see that a feature. The scenario: Polygon < Array, if you select a subset it's no longer a Polygon
<nofxx>
see any better approach?
semperfried76 has quit [Ping timeout: 252 seconds]
<nofxx>
it's not a full blown geometric lib, just a wrapper for mongoid btw
<apeiros>
nofxx: if I select 4 points (3 edges) out from an 8 points (7 edges) polygon, I still have a polygon IMO
<nofxx>
apeiros, you don't unless you close it... I may agree if it's LineString < Array
<apeiros>
as said, I'd use composition, not inheritance. that is, have an instance variable @points e.g., and implement all methods. also see Forwardable and Delegator for simple delegation.
<jhass>
point is, it varies from case to case whether it is expected, which makes it potentially unexpected. With composition you have more control or are at least less likely to oversee something
<jhass>
er, *overlook
<nofxx>
I see... practically that will be include Enumerable and def yield ? refresh my poor memory
<Mon_Ouie>
You can find several methods named the same as keywords in core ruby though. Range#begin and Range#and, Object#class, Fiber.yield, etc.
<yxhuvvd>
Mon_Ouie, good point
dorei has joined #ruby-lang
enebo has joined #ruby-lang
sonic_boom has joined #ruby-lang
<apeiros>
just can't use them as lvar name
b_hoffman has quit [Quit: b_hoffman]
<nofxx>
How to mimic Array`s behavior of returning a default value? In the class Polygon; include Enumerable; attr_accessor :points, Can I skip writing #points everytime?
<nofxx>
my grandpa use to have a barbecue on holy friday, actually depicts what christianity is: you may do wrong 364 days of the year if you just do it right one day
<yorickpeterse>
hahaha
<yorickpeterse>
did he
<yorickpeterse>
BBQ for our sins?
<yorickpeterse>
( •_•) ( •_•)>⌐■-■ (⌐■_■)
riotjones has quit [Ping timeout: 248 seconds]
<maloik>
yorick broke my irc client
<nofxx>
yorickpeterse, kardecist fanatic
<yorickpeterse>
lol
<maloik>
and yes yes I know, fix my terminal/irssi client