<hays_>
anyone here run rubocop as a style guide enforcer? it seems to really crack down too much on ABC complexity and method length. specifically im hung up on a situation where i have a case statement with a bunch of possible cases, each one calls a separate method so they are one line, and even so it exceeds the method lengh. can't see how to break it up so its clearer
moei has quit [Ping timeout: 244 seconds]
<hays_>
i thought about subclassing to avoid the case statement, but it just moves the problem up the chain, eventually to a JSON config object that must do a case statement on a bunch of possible strings
<hays_>
i could make a dict that mayby maps strings to classes, and then use a lookup to create the class.. but now i've just moved it to a dict, which seems like cheating
bijan_ has quit [Ping timeout: 264 seconds]
<hays_>
class_lookup[:foo].new. i guess that's pretty clean.
kotepillar_ has joined #ruby
tristanp has quit [Remote host closed the connection]
akem__ has quit [Remote host closed the connection]
akem__ has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
sauvin has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
MoritaShinobu has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 245 seconds]
mike11 has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
tdy has quit [Ping timeout: 244 seconds]
bijan_ has joined #ruby
MoritaShinobu has joined #ruby
hays_ has quit [Ping timeout: 246 seconds]
bijan_ has quit [Ping timeout: 252 seconds]
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
yasser_ has joined #ruby
llua has joined #ruby
<yasser_>
my rails plugin for vim does not work properly
<yasser_>
anybody used the vim plugin for rails?
<yasser_>
:find command only searches through .rb files
bijan_ has joined #ruby
aupadhye has joined #ruby
yasser_ has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
johnny56 has quit [Ping timeout: 272 seconds]
jottr has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
v01d4lph4 has quit [Remote host closed the connection]
aupadhye has joined #ruby
gnufied has joined #ruby
fluxAeon has joined #ruby
hays_ has joined #ruby
IanMalcolm has joined #ruby
<hays_>
this is the best i can do to avoid a big fat case statement, but rubocop still whines about the class variable. what do you guys think. any way to avoid it? Is this too strange?
conta1 has quit [Remote host closed the connection]
arup_r has joined #ruby
jottr has joined #ruby
sysvalve has quit [Quit: Leaving]
vdl has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 245 seconds]
rikkipitt has quit [Quit: Leaving...]
jcarl43 has joined #ruby
InfinityFye has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
RougeR has quit [Ping timeout: 246 seconds]
<siaw23>
I have something like this YAML.load_file('some_file.yml')
<siaw23>
this loads the file once, is there way i can load the file on demand?
<siaw23>
something similar to Rails’ ‘load’ method
<siaw23>
im’ using this in a sinatra app and i want to be able to load the file without starting the sinatra server
<siaw23>
i tried using a proc and calling it each time i needed but doesn’t work, any ideas that’d work?
thy0 has quit [Quit: TTFN]
lxsameer has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
agent_white has joined #ruby
SeepingN has joined #ruby
lxsameer has joined #ruby
[Butch] has joined #ruby
IanMalcolm has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 244 seconds]
Beams has quit [Quit: .]
yohji has quit [Remote host closed the connection]
cagomez has quit [Remote host closed the connection]
arup_r has quit []
lxsameer has joined #ruby
IanMalcolm has joined #ruby
bmurt has joined #ruby
<apeiros>
siaw23: eh? YAML.load_file will load the file every time you invoke it.
<apeiros>
there is no caching or anything
lxsameer has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
impermanence has quit [Remote host closed the connection]
jottr has joined #ruby
<siaw23>
apeiros: well in my simple sinatra app, a yaml file with {“foo” => “bar} is load when i start the sinatra server, while the server is on, change to {“foo” => “foo”} doesn’t reflect the change until the server is restarted
<siaw23>
this is what i meant
<apeiros>
yeah, well, the answer to your question is "yes, there is something to load a yaml file on demand, it's YAML.load_file"
lxsameer has joined #ruby
<apeiros>
but given your response, that's not really your question and you should think again about what you actually want to ask and what you information need to provide for people to actually be able to answer
jottr has quit [Ping timeout: 245 seconds]
DTZUZO has quit [Ping timeout: 246 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
siaw23 has quit [Quit: siaw23]
lxsameer has joined #ruby
siaw23 has joined #ruby
<havenwood>
siaw23: We could probably help if you showed the code to give us context.
<havenwood>
siaw23: It sounds like you're setting a constant instead of calling a method that reruns that code or something, but from what you've said iso far t's impossible to know.
<siaw23>
havenwood: i can share the repo :)
c0ncealed2 has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 252 seconds]
duderono_ has joined #ruby
c0ncealed2 has joined #ruby
safetypin has quit [Ping timeout: 244 seconds]
safetypin has joined #ruby
cagomez has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
MoritaShinobu has quit [Quit: Leaving]
jic has joined #ruby
charlielor has joined #ruby
lxsameer has joined #ruby
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doubledup has joined #ruby
impermanence has joined #ruby
rippa has joined #ruby
lxsameer has quit [Ping timeout: 272 seconds]
baweaver is now known as baweaver_away
GodFather has joined #ruby
<charlielor>
I’m trying to drop all database and this is what I got. https://kopy.io/TJ7LD Any suggestion?
jottr has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
<apeiros>
?rails charlielor
* apeiros
pokes ruby[bot]
ruby[bot] has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
ruby[bot] has joined #ruby
<charlielor>
I’m running ruby version 2.4.4
graphene has quit [Read error: Connection reset by peer]
<apeiros>
?rails charlielor
<ruby[bot]>
charlielor: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
lxsameer has joined #ruby
graphene has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
cd has joined #ruby
orbyt_ has joined #ruby
Azure has joined #ruby
desperek has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
lxsameer has quit [Ping timeout: 272 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Client Quit]
beefjoe has joined #ruby
[Butch] has quit [Ping timeout: 246 seconds]
[Butch] has joined #ruby
lxsameer has joined #ruby
n13z has quit [Remote host closed the connection]
safetypin has quit [Quit: ZZZzzz…]
duderonomy has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
SeepingN has quit [Ping timeout: 252 seconds]
kapil___ has joined #ruby
lxsameer has joined #ruby
jottr has joined #ruby
illuzion has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
jottr has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
safetypin has joined #ruby
safetypin has quit [Client Quit]
lxsameer has quit [Ping timeout: 252 seconds]
safetypin has joined #ruby
lxsameer has joined #ruby
IanMalcolm has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 252 seconds]
hgost has joined #ruby
hgost has quit [Quit: WeeChat 1.6]
lxsameer has joined #ruby
SeepingN has joined #ruby
sauvin has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 245 seconds]
SeepingN has quit [Ping timeout: 244 seconds]
thejs has quit [Ping timeout: 252 seconds]
SeepingN has joined #ruby
segy has quit [Ping timeout: 245 seconds]
Azure has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
graphene has quit [Read error: Connection reset by peer]
safetypin has quit [Quit: ZZZzzz…]
impermanence has quit [Remote host closed the connection]
graphene has joined #ruby
gmcintire has joined #ruby
Azure has joined #ruby
segy has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
safetypin has joined #ruby
lxsameer has joined #ruby
akem has quit [Remote host closed the connection]
akem has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
eckhardt has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
thejs has joined #ruby
T3RM1N41 has joined #ruby
sameerynho has joined #ruby
illuzion has quit [Ping timeout: 252 seconds]
nowhere_man has quit [Ping timeout: 250 seconds]
mike11 has joined #ruby
beefjoe has quit [Remote host closed the connection]
lunarkitty has joined #ruby
Azure|dc has joined #ruby
Azure has quit [Read error: Connection reset by peer]
charlielor has quit [Quit: charlielor]
longshi has joined #ruby
jmcgnh_ is now known as jmcgnh
Hexian has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
Turnikov has joined #ruby
Dbugger has quit [Remote host closed the connection]
dellavg_ has quit [Ping timeout: 246 seconds]
weaksauce has joined #ruby
siaw23 has quit [Quit: siaw23]
safetypin has quit [Quit: ZZZzzz…]
jottr has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
IanMalcolm has joined #ruby
siaw23 has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
thy0 has joined #ruby
desperek has quit [Quit: xoxo]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
thy0_ has joined #ruby
weaksauce has quit [Ping timeout: 264 seconds]
thy0 has quit [Ping timeout: 244 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has joined #ruby
jcalla has quit [Quit: Leaving]
[Butch] has quit [Ping timeout: 246 seconds]
graphene has quit [Remote host closed the connection]
longshi has quit [Ping timeout: 240 seconds]
graphene has joined #ruby
Turnikov has quit [Quit: Leaving]
reber has quit [Read error: Connection reset by peer]
IanMalcolm has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Turnikov[m] has joined #ruby
Turnikov has joined #ruby
lxsameer has joined #ruby
<Turnikov[m]>
riot.im test
longshi has joined #ruby
za1b1tsu has quit [Ping timeout: 240 seconds]
<havenwood>
!kick Turnikov[m] Please limit your conversation here to the subject of Ruby programming language!
Turnikov[m] was kicked from #ruby by ruby[bot] [Please limit your conversation here to the subject of Ruby programming language!]
Turnikov was kicked from #ruby by ruby[bot] [Please limit your conversation here to the subject of Ruby programming language!]
lxsameer has quit [Ping timeout: 245 seconds]
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
doubledup has quit [Quit: Leaving]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mike11 has quit [Ping timeout: 240 seconds]
thy0_ has quit [Quit: TTFN]
thy0 has joined #ruby
duderonomy has joined #ruby
jottr has joined #ruby
Turnikov[m] has joined #ruby
ur5us has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
tdy has joined #ruby
baweaver_away is now known as baweaver
DTZUZO has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cloaked1 has joined #ruby
stan has quit [Ping timeout: 252 seconds]
Turnikov has joined #ruby
Turnikov has quit [Client Quit]
ShekharReddy has joined #ruby
<Hexian>
is there any sane way to use mkmf with C source files in multiple directories, each with nested directories? only options I can find are bad and also don't even work
MyMind has joined #ruby
Sembei has quit [Ping timeout: 252 seconds]
tdy has quit [Ping timeout: 244 seconds]
sameerynho has quit [Ping timeout: 244 seconds]
siaw23 has quit [Quit: siaw23]
Azure|dc has quit [Ping timeout: 252 seconds]
brandoncc has joined #ruby
clemens3_ has quit [Ping timeout: 245 seconds]
longshi has quit [Quit: WeeChat 2.2]
Hexian has quit [Quit: Page closed]
fowlduck has joined #ruby
graphene has quit [Remote host closed the connection]
FastJack has quit [Ping timeout: 240 seconds]
graphene has joined #ruby
FastJack has joined #ruby
ged has quit [Read error: Connection reset by peer]
thejs has quit [Remote host closed the connection]
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #ruby
tdy has joined #ruby
cloaked1 has quit [Quit: Leaving]
tdy has quit [Ping timeout: 246 seconds]
cschneid_ has joined #ruby
lxsameer has joined #ruby
RougeR has joined #ruby
cschneid_ has quit [Ping timeout: 246 seconds]
lxsameer has quit [Ping timeout: 252 seconds]
Azure has joined #ruby
safetypin has joined #ruby
safetypin has quit [Client Quit]
safetypin has joined #ruby
dostoyevsky has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: inabit.]
bmurt has joined #ruby
[Butch] has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]