« Back to channel list

#ruby - 19 June 2017

« Back 1 day Forward 1 day »
[00:04:06] Danny: has joined #ruby
[00:05:02] ornerymoose: has joined #ruby
[00:08:12] Kug3lis: has joined #ruby
[00:13:02] frustrum: has joined #ruby
[00:16:59] skweek: has joined #ruby
[00:22:12] boadie: has joined #ruby
[00:23:58] geggam: hightower2, my ruby is weak has hell but it looks like that map creates an array correct ?
[00:34:05] hogetaro: has joined #ruby
[00:37:12] bauruine: has joined #ruby
[00:38:37] hightower2: yes, it should
[00:39:09] umaaji: has joined #ruby
[00:40:38] arescorpio: has joined #ruby
[00:41:53] gnufied: has joined #ruby
[00:45:58] chichou: has joined #ruby
[00:46:51] chaugiang: has joined #ruby
[00:53:22] creshiem: has joined #ruby
[00:53:30] bdnelson: has joined #ruby
[00:54:19] cschneid_: has joined #ruby
[01:00:45] ketan: has joined #ruby
[01:01:07] weathermaker: has joined #ruby
[01:01:49] chaugiang: has left #ruby: ()
[01:04:07] Danny: has joined #ruby
[01:09:53] enterprisey: has joined #ruby
[01:09:55] geggam: this is what i was trying to do hightower2 https://pastebin.mozilla.org/9025238
[01:10:45] geggam: it correlates to the mapping and the sort doesnt lose the index.. so i create a dynamic port mapping for autoscaling ( sort of ) cassandra nodes with stunnel configuratons
[01:11:08] geggam: cassandra isnt autoscaling per se but i have everything ready to do the synchronizing if said db dies
[01:11:52] geggam: now i can drop this on all the application servers and rest assured they are all connecting to the same system
[01:12:04] geggam: happy fathers day btw
[01:20:30] Rodya_: has joined #ruby
[01:21:12] skweek: has joined #ruby
[01:22:24] jenrzzz: has joined #ruby
[01:26:53] gnufied: has joined #ruby
[01:28:13] Bock: has joined #ruby
[01:33:26] questionaboutrai: has joined #ruby
[01:36:05] confused4life: has joined #ruby
[01:36:42] confused4life: If I have a class C, e.g. String, what is the difference between C.methods and C.instance_methods?
[01:40:24] nankyokusei: has joined #ruby
[01:47:18] charliesome: has joined #ruby
[01:49:12] cadillac_: has joined #ruby
[01:49:15] cam27: has joined #ruby
[01:53:22] byte512: has joined #ruby
[01:54:26] DaniG2k: has joined #ruby
[01:55:18] brianjason: has joined #ruby
[01:55:27] brianjason: has left #ruby: ()
[01:58:12] d^sh: has joined #ruby
[02:03:46] ornerymoose: has joined #ruby
[02:09:15] ornerymoose: has joined #ruby
[02:11:14] Jameser`: has joined #ruby
[02:13:03] Danny: has joined #ruby
[02:21:52] bauruine: has joined #ruby
[02:32:53] uZiel: has joined #ruby
[02:34:07] djbkd: has joined #ruby
[02:34:09] hurricanehrndz: has joined #ruby
[02:40:48] moei: has joined #ruby
[02:44:36] Rodya_: has joined #ruby
[02:44:59] Azure: has joined #ruby
[02:57:10] Dimik: has joined #ruby
[02:57:32] [ohjn]: has joined #ruby
[02:59:17] uZiel: has joined #ruby
[03:01:37] ketan: has joined #ruby
[03:02:49] [ohjn]: has joined #ruby
[03:07:11] patr0clus: has joined #ruby
[03:12:57] LiquidInsect: has joined #ruby
[03:15:32] jordanm: has joined #ruby
[03:24:28] jenrzzz: has joined #ruby
[03:24:28] jenrzzz: has joined #ruby
[03:26:49] Danny: has joined #ruby
[03:32:17] thekingofbandit: has joined #ruby
[03:32:57] uZiel: has joined #ruby
[03:34:41] PaulCape_: has joined #ruby
[03:41:16] nankyokusei: has joined #ruby
[03:42:54] cschneid_: has joined #ruby
[03:43:18] gix: has joined #ruby
[03:46:23] cfec0b8d: has joined #ruby
[03:49:21] charliesome: has joined #ruby
[03:54:34] AnoHito_: has joined #ruby
[03:59:44] claw: has joined #ruby
[04:01:15] minimalism: has joined #ruby
[04:08:48] adrianvalenz_: has joined #ruby
[04:09:08] adrianvalenz_: Hello. Ruby on Rails room is dead right now, mind if I ask a Rails question?
[04:09:58] adrianvalenz_: bougyman: Want to join me over at the rails channel? :D
[04:12:36] bauruine: has joined #ruby
[04:12:36] iamayam: has joined #ruby
[04:20:33] renchan: has joined #ruby
[04:27:55] Jameser: has joined #ruby
[04:30:55] hutch34: has joined #ruby
[04:35:07] Danny: has joined #ruby
[04:41:58] geggam_: has joined #ruby
[04:46:28] geggam__: has joined #ruby
[04:51:28] TomyLobo: has joined #ruby
[04:56:01] astrobunny: has joined #ruby
[04:59:28] TomyLobo: has joined #ruby
[04:59:46] govg: has joined #ruby
[05:02:17] djbkd: has joined #ruby
[05:02:29] ketan: has joined #ruby
[05:06:43] w0b: has joined #ruby
[05:11:50] astrobunny: has joined #ruby
[05:16:48] uZiel: has joined #ruby
[05:21:30] nicesignal: has joined #ruby
[05:21:44] ltem: has joined #ruby
[05:24:56] blackwind_123: has joined #ruby
[05:26:16] jenrzzz: has joined #ruby
[05:26:16] jenrzzz: has joined #ruby
[05:33:04] rohitpaulk: has joined #ruby
[05:37:59] aupadhye: has joined #ruby
[05:39:14] uZiel: has joined #ruby
[05:40:12] doublemalt_: has joined #ruby
[05:42:08] nankyokusei: has joined #ruby
[05:44:21] DaniG2k: has joined #ruby
[05:45:45] harfangk: has joined #ruby
[05:45:59] rohitpaulk: has joined #ruby
[05:46:48] brent__: has joined #ruby
[05:52:11] cschneid_: has joined #ruby
[05:54:47] quobo: has joined #ruby
[06:00:15] user: has joined #ruby
[06:03:47] ryzokuken_: has joined #ruby
[06:18:29] roshanavand: has joined #ruby
[06:18:31] anisha: has joined #ruby
[06:21:03] conta: has joined #ruby
[06:24:30] rohitpaulk: has joined #ruby
[06:25:00] pleiosaur: has joined #ruby
[06:39:33] jaruga_________: has joined #ruby
[06:40:04] nofxxxx: has joined #ruby
[06:42:01] TomyWork: has joined #ruby
[06:44:08] hightower2: has joined #ruby
[06:48:15] umaaji: has joined #ruby
[06:49:59] ledestin: has joined #ruby
[06:50:56] perry: has joined #ruby
[06:50:56] perry: has joined #ruby
[07:01:47] nachoman: has joined #ruby
[07:02:21] igniting: has joined #ruby
[07:03:20] ketan: has joined #ruby
[07:07:16] vondruch: has joined #ruby
[07:08:58] agent_white: has joined #ruby
[07:09:54] Mia: has joined #ruby
[07:10:47] dionysus69: has joined #ruby
[07:11:13] bigkevmcd: has joined #ruby
[07:14:30] Mortomes|Work: has joined #ruby
[07:17:04] sarbs: has joined #ruby
[07:20:44] bkxd: has joined #ruby
[07:20:46] bkxd_: has joined #ruby
[07:22:26] tAn: has joined #ruby
[07:25:41] tvw: has joined #ruby
[07:26:22] andikr: has joined #ruby
[07:27:34] biberu: has joined #ruby
[07:28:07] jenrzzz: has joined #ruby
[07:28:07] jenrzzz: has joined #ruby
[07:40:52] sondr3: has joined #ruby
[07:42:22] antgel: has joined #ruby
[07:43:01] nankyokusei: has joined #ruby
[07:43:15] sysvalve: has joined #ruby
[07:44:05] bkxd__: has joined #ruby
[07:44:24] bkxd___: has joined #ruby
[07:45:36] vali: has joined #ruby
[07:47:10] Mutter: has joined #ruby
[07:47:20] DaniG2k: has joined #ruby
[07:52:59] Mutter: has joined #ruby
[07:55:51] fullmoonpie: has joined #ruby
[07:56:49] def_jam: has joined #ruby
[07:57:15] eb0t_: has joined #ruby
[07:57:46] fullmoonpie: how do i add a plugin to a gem?
[07:57:46] fullmoonpie: specifically i installed the megahal gem and want an irc plugin for it
[07:58:00] ferr: has joined #ruby
[07:59:01] dminuoso: A plugin to a gem?
[07:59:17] dminuoso: fullmoonpie: Does the gem come with some form of plugin infrastructure?
[08:00:12] fullmoonpie: ya i think so? so i installed the megahal gem
[08:00:57] Silthias1: has joined #ruby
[08:01:04] fullmoonpie: dminuoso, and iwanted to isntall this plugin for it? https://github.com/hinrik/poe-component-irc-plugin-megahal
[08:02:02] burgestrand: has joined #ruby
[08:02:09] xall: has joined #ruby
[08:06:07] joonty: has joined #ruby
[08:06:31] Stan: has joined #ruby
[08:06:48] bkxd: has joined #ruby
[08:07:15] bkxd_: has joined #ruby
[08:09:01] aufi: has joined #ruby
[08:10:54] matthewd: fullmoonpie: That's a Perl library.
[08:11:58] fullmoonpie: ow >_<, thanks matthewd i guess i should get some sleep
[08:12:30] jaruga_________: has joined #ruby
[08:14:46] sekmo: has joined #ruby
[08:16:59] nickjj: has joined #ruby
[08:25:17] marr: has joined #ruby
[08:28:13] mim1k: has joined #ruby
[08:32:59] drptbl: has joined #ruby
[08:33:52] bauruine: has joined #ruby
[08:34:19] rohitpaulk: has joined #ruby
[08:34:32] bkxd__: has joined #ruby
[08:36:30] bkxd: has joined #ruby
[08:38:50] lxsameer: has joined #ruby
[08:39:23] faces: has joined #ruby
[08:40:35] SaschaVoid: has joined #ruby
[08:46:19] aurelien`: has joined #ruby
[08:46:59] Beams: has joined #ruby
[08:47:31] aurelien: has joined #ruby
[08:49:04] mim1k: has joined #ruby
[08:56:03] astrobunny: has joined #ruby
[09:00:17] ujjain: has joined #ruby
[09:00:17] ujjain: has joined #ruby
[09:00:33] tomphp: has joined #ruby
[09:01:44] cfec0b8d: has joined #ruby
[09:02:18] vuoto: has joined #ruby
[09:04:12] ketan: has joined #ruby
[09:06:17] sekmo: has joined #ruby
[09:09:03] ur5us: has joined #ruby
[09:09:56] jenrzzz: has joined #ruby
[09:09:56] jenrzzz: has joined #ruby
[09:10:56] KillerFox: has joined #ruby
[09:11:19] ujjain: has joined #ruby
[09:11:19] ujjain: has joined #ruby
[09:12:03] FastJack: has joined #ruby
[09:12:31] forgot: has joined #ruby
[09:17:36] bkxd_: has joined #ruby
[09:18:27] sondr3: has joined #ruby
[09:19:26] bkxd: has joined #ruby
[09:19:47] mim1k: has joined #ruby
[09:20:58] workmad3: has joined #ruby
[09:21:16] justatech: has joined #ruby
[09:22:24] meshsmith: has joined #ruby
[09:23:39] justatech: http://termbin.com/13x4
[09:23:55] justatech: when run this code i get this server.rb:3:in `<main>': undefined method `get' for main:Object (NoMethodError)
[09:24:12] dminuoso: ?gist justatech
[09:24:12] ruby[bot]: justatech: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[09:24:24] ljarvis: justatech: why do you think that would work?
[09:24:35] RazorX: has joined #ruby
[09:24:50] dminuoso: ljarvis: Should I be glad that I cant see that code?
[09:25:03] dminuoso: Am I avoiding rage hormons?
[09:25:38] ljarvis: https://gist.github.com/anonymous/9e2cd3b92e547222bf324cf862d7029c
[09:25:57] ljarvis: justatech: you're probably using something like sinatra, correct?
[09:26:40] dminuoso: ljarvis: Bah. I was hoping for something truly stupid.
[09:26:52] ljarvis: afraid not
[09:26:57] ljarvis: maybe next time
[09:27:07] dminuoso: ljarvis: Be sure to highlight me.
[09:27:16] ljarvis: sure thing, i got you
[09:27:21] saltsa: has joined #ruby
[09:27:44] sarbs: has joined #ruby
[09:29:11] [reed]: has joined #ruby
[09:29:11] [reed]: has joined #ruby
[09:29:38] ljarvis: justatech: well, you don't require sinatra anywhere in your code
[09:29:51] justatech: what's the solution for this
[09:29:54] ljarvis: that's how the `get` method gets defined
[09:29:59] ljarvis: justatech: do you know Ruby?
[09:30:33] justatech: i'm testing this code for SSRF vulnerability , i am pretty not introduced to ruby at all
[09:30:52] ljarvis: justatech: then I recommend hiring someone to do the Ruby part for you
[09:31:51] justatech: ljarvis cool
[09:32:09] justatech: i would ask stackoverflow
[09:32:26] ljarvis: that's not what i would suggest, but ok
[09:34:31] ur5us: has joined #ruby
[09:40:50] Mutter: has joined #ruby
[09:43:51] nankyokusei: has joined #ruby
[09:46:43] rgr: has joined #ruby
[09:47:19] brent__: has joined #ruby
[09:50:40] Jameser: has joined #ruby
[09:53:47] anisha_: has joined #ruby
[09:55:14] im0nde: has joined #ruby
[09:56:07] mim1k: has joined #ruby
[09:59:20] workmad3: has joined #ruby
[10:00:47] sekmo: has joined #ruby
[10:00:53] bkxd: has joined #ruby
[10:01:09] bkxd_: has joined #ruby
[10:03:53] Mutter: has joined #ruby
[10:08:30] xall: has joined #ruby
[10:12:14] facest: has joined #ruby
[10:13:42] blackwind_123: has joined #ruby
[10:14:29] conta: has joined #ruby
[10:15:08] astrobunny: has joined #ruby
[10:17:20] astrobun_: has joined #ruby
[10:27:50] Nahra: has joined #ruby
[10:27:54] cschneid_: has joined #ruby
[10:29:12] nowhere_man: has joined #ruby
[10:29:41] universa1: has joined #ruby
[10:29:42] jjunior_: has joined #ruby
[10:30:30] astrobunny: has joined #ruby
[10:31:31] hutch34: has joined #ruby
[10:31:56] conta: has joined #ruby
[10:32:46] astrobunny: has joined #ruby
[10:32:48] nobitanobi: has joined #ruby
[10:34:58] volix: has joined #ruby
[10:35:15] mim1k: has joined #ruby
[10:35:29] charliesome: has joined #ruby
[10:35:33] astrobun_: has joined #ruby
[10:36:13] sepp2k: has joined #ruby
[10:36:45] skarlso: has joined #ruby
[10:37:27] Bhootrk_: has joined #ruby
[10:40:00] bkxd__: has joined #ruby
[10:40:29] bkxd___: has joined #ruby
[10:46:01] Rodya_: has joined #ruby
[10:47:18] antgel: has joined #ruby
[10:48:47] vondruch: has joined #ruby
[10:52:03] sondr3: has joined #ruby
[10:53:29] GorillaApe: has joined #ruby
[10:53:46] coderhut: has joined #ruby
[10:53:50] dragoonis: has joined #ruby
[10:54:04] ryzokuken_: has joined #ruby
[10:54:06] dragoonis: Hey! What's the ruby coding standards called?
[10:54:18] dragoonis: PHP has PSR's. Java has JSR's. Python has PIP
[10:55:16] umaaji: has joined #ruby
[10:55:29] ljarvis: dragoonis: pep is for enhancement proposals, it's not a coding standard
[10:55:56] ljarvis: anyway, Ruby just has all of that stuff in their redmine tracker: https://bugs.ruby-lang.org/
[10:56:12] dragoonis: effectively I'm looking for static analysis tools for ruby, python ..etc to give the team a sense of consistency
[10:56:21] coderhut: has joined #ruby
[10:57:04] dragoonis: Can someone tell me what the Ruby one is called? or link me to the right place? thanks!
[10:58:02] dragoonis: Respectively - need code sniffers / static analysis tools to check such compliance
[10:58:10] GorillaApe: I have a class called Client. Client class uses two types of connections implemented in different classes(ClassA, ClassB). Which is a clean way to provide some kind of events to client instance? For example when ClassB looses connection I want Client to be notified.
[10:58:18] ljarvis: dragoonis: maybe you just want Rubocop: http://rubocop.readthedocs.io
[10:58:36] dragoonis: has joined #ruby
[10:58:40] GorillaApe: I tried delegate but I am not sure whether it is ok
[10:59:22] coderhut: has joined #ruby
[10:59:31] dragoonis: ljarvis, i know about rubocop, yeah
[11:00:03] Fernando-Basso: has joined #ruby
[11:00:19] coderhut: has joined #ruby
[11:01:46] coderhut: has joined #ruby
[11:05:06] ketan: has joined #ruby
[11:05:43] coderhut: has joined #ruby
[11:09:57] elomatreb: dragoonis: There is no *official* Ruby style guide, if that's what you were looking for. The most commonly used one is probably https://github.com/bbatsov/ruby-style-guide, which Rubocop follows by default
[11:10:10] dminuoso: elomatreb: There should be.
[11:10:24] vuoto: has joined #ruby
[11:10:24] dminuoso: I vote that my style be promoted to the official style _rules_.
[11:10:34] dminuoso: Clearly my style is superior to yours.
[11:10:42] dragoonis: elomatreb, thanks! I'm really just looking for the most community adopted one - which rubocop is going with, so that's good
[11:10:47] elomatreb: I don't know, I always break the official ones because they mandate single quotes which are a pain to type on QWERTZ
[11:10:50] marr: has joined #ruby
[11:11:02] dminuoso: elomatreb: Use US layout like a real programmer
[11:11:09] elomatreb: But how will I umlaut
[11:11:31] dminuoso: alt+cmd+spacebar, ]-key, alt+cmd+spacebar.
[11:11:37] dminuoso: or just ae, ue, oe?
[11:11:54] dminuoso: Or stop talking to people altogether.
[11:12:02] dminuoso: Solves so many issues, including this.
[11:14:07] quobo: has joined #ruby
[11:15:33] charliesome: has joined #ruby
[11:20:46] pandaant: has joined #ruby
[11:25:04] vuoto: has joined #ruby
[11:25:42] Alex9: has joined #ruby
[11:26:59] Alex9: has left #ruby: ()
[11:31:24] xall: has joined #ruby
[11:36:53] ldnunes: has joined #ruby
[11:41:06] Pumukel: has joined #ruby
[11:42:21] snowter: has joined #ruby
[11:42:52] fxa90id: has joined #ruby
[11:44:24] nankyokusei: has joined #ruby
[11:46:54] sonOfRa: has joined #ruby
[11:47:27] Silthias: has joined #ruby
[11:53:39] sondr3: has joined #ruby
[11:54:49] futilegames: has joined #ruby
[11:58:12] jottr: has joined #ruby
[11:58:49] hutch34: has joined #ruby
[11:59:33] ketan: has joined #ruby
[12:01:33] bvcosta: has joined #ruby
[12:03:34] sysvalve: has joined #ruby
[12:03:51] snowter: hi there, I'm working on a small project and I'm wondering if it's better to use sinastra instead rails
[12:04:40] d10n-work: has joined #ruby
[12:09:30] cadillac_: has joined #ruby
[12:09:46] ketan: has joined #ruby
[12:10:18] ujjain: has joined #ruby
[12:10:19] ujjain: has joined #ruby
[12:13:21] rgr: has joined #ruby
[12:26:06] _mak: what is the one document the best capture software design?
[12:26:07] burgestrand: has joined #ruby
[12:28:27] tobiasvl: _mak: what?
[12:29:28] _mak: tobiasvl: what is the best document to capture software design
[12:29:39] _mak: ops, I just rewrote the same thing..
[12:30:05] _mak: I'm looking for what is the most useful type of documentation to capture the way a software should work
[12:31:10] spiette: has joined #ruby
[12:32:15] pupsicle1: has joined #ruby
[12:33:07] yxhuvud: It may possibly be https://www.goodreads.com/book/show/28862.The_Prince
[12:33:57] kasisnu: has joined #ruby
[12:34:51] leah2: ged: hey. for legacy reasons i use bluecloth 1... do you know if anyone implemented fenced code blocks (```) for it?
[12:38:08] burgestrand: has joined #ruby
[12:44:00] workmad3: _mak: depends massively on the size and architecture of the software in question
[12:46:26] ledestin: has joined #ruby
[12:46:49] bvcosta: has joined #ruby
[12:47:04] brent__: has joined #ruby
[12:49:27] burgestrand: has joined #ruby
[12:49:28] mim1k: has joined #ruby
[12:50:49] __Yiota: has joined #ruby
[12:57:13] _whitelogger: has joined #ruby
[12:57:46] gnufied: has joined #ruby
[12:59:52] type01: has joined #ruby
[12:59:56] type01: Hello everyone.
[13:00:45] tAn: has joined #ruby
[13:01:20] simmaniac: has joined #ruby
[13:03:10] zapata: has joined #ruby
[13:05:46] type01: An API I am making a request to is giving some details in the HTTP status (a full sentence). I'm looking to parse that but it looks like net/http has no way to access the raw status and instead response.code returns the number 403 only.
[13:06:16] elomatreb: As in the words after the status codes?
[13:07:09] Jameser: has joined #ruby
[13:07:59] Rodya_: has joined #ruby
[13:09:28] type01: elomatreb yes
[13:09:45] raul782: has joined #ruby
[13:10:08] elomatreb: Tried response#message?
[13:10:21] type01: elomatreb it is blank.
[13:11:10] type01: elomatreb oh sorry message says "Forbidden", but there's an entire sentence after that too.
[13:13:04] type01: elomatreb I verified this with Postman and curl (verbose mode)
[13:13:15] elomatreb: Personally I'd question the API if it does something like that
[13:16:15] octomancer: i'd say that the server is pushing it's luck to abuse the reason-phrase like that
[13:16:24] octomancer: much better to return it in an X- header
[13:18:19] type01: elomatreb exactly :D me too. Just that I have to live with it.
[13:20:10] burgestrand: has joined #ruby
[13:23:55] nanoz: has joined #ruby
[13:26:30] patarr: has joined #ruby
[13:26:35] shinnya: has joined #ruby
[13:26:35] Mutter: has joined #ruby
[13:26:43] dionysus69: I need help with string manipulation and setting up validation. i need to validate if the number is 9 digit long and that all of the string chars are digits. also I need to verify that first 3 digits are of following combination tel_codes = [514, 551, 555, 557, 558, 559, 568, 570, 571, 574, 577, 591, 592, 593, 595, 596, 597, 598, 599] and I also need to escape string before doing all this, people may enter number as 599-01-10-12 or 593110022 or
[13:27:07] dionysus69: when it comes to escaping, I need to escape anything but 0-9
[13:27:14] psychicist__: has joined #ruby
[13:27:19] elomatreb: By escaping you mean stripping them from the string?
[13:27:36] dionysus69: yep, stripping down only to 9 digit number sequence
[13:27:49] centrx: has joined #ruby
[13:27:49] centrx: has joined #ruby
[13:28:19] dionysus69: if it is escaped and there are no 9 digits and first 3 digits dont match any of those codes, i need to throw validation error in rails
[13:28:46] dionysus69: if you think I should rather use regex for this, let me know. I am not sure which one is better in terms of performance or other variables
[13:29:05] DLSteve: has joined #ruby
[13:29:09] cadillac__: has joined #ruby
[13:29:15] elomatreb: You can use String#tr to strip everything but numbers first, and then I'd probably check the length and then the first three digits
[13:29:54] dionysus69: I would check first 3 digits with substring(3) method
[13:29:59] dionysus69: ok let me try :)
[13:30:31] A124: has joined #ruby
[13:31:02] kasisnu_: has joined #ruby
[13:32:58] rkazak: has joined #ruby
[13:34:30] aenialis: has joined #ruby
[13:38:04] dragoonis: Hey dionysus69
[13:38:40] dionysus69: haha nope, from Georgia
[13:38:50] dragoonis: diff person
[13:42:19] haylon: has joined #ruby
[13:42:40] aenialis: has joined #ruby
[13:45:35] nankyokusei: has joined #ruby
[13:47:25] camonz: has joined #ruby
[13:48:23] chat: has joined #ruby
[13:51:50] gizmore: has joined #ruby
[13:52:01] SpiffTR: has joined #ruby
[13:54:18] type01: has joined #ruby
[13:57:59] leah2: has joined #ruby
[13:58:33] Cork: i have a class that has a "method" function, is there a way to call Object#method on this instance or isn't that accessable anymore?
[13:58:51] __Yiota: has joined #ruby
[13:59:01] jphase: has joined #ruby
[13:59:35] Jameser: has joined #ruby
[14:00:27] Hunter1: has joined #ruby
[14:01:10] Mutter: has joined #ruby
[14:01:12] elomatreb: Cork: Messy, but works: https://eval.in/818938
[14:01:22] chat____4: has joined #ruby
[14:01:43] Cork: ah i suspected that one, and ya i am expecting messy; it is in a test suite so that's ok
[14:01:53] elomatreb: See https://ruby-doc.org/core-2.4.1/UnboundMethod.html
[14:02:29] ResidentBiscuit: has joined #ruby
[14:03:32] LightStalker: has joined #ruby
[14:04:57] Cork: elomatreb: thx for the help!
[14:05:54] hutch34: has joined #ruby
[14:06:20] oleo: has joined #ruby
[14:07:28] PatrikasZvaigzde: has joined #ruby
[14:08:11] Jameser: has joined #ruby
[14:11:08] dragoonis: If I wanted to check if a cookbook is correct, kind of like static analysis - what's the tool for this?
[14:11:29] dragoonis: just to make sure the cookbook is passable, and executable (on target server), but I want to check such things are build time on the CI servers
[14:12:24] konsolebox: has joined #ruby
[14:14:25] bsamorim: has joined #ruby
[14:14:50] bsamorim: Hello, guys! Do blank spaces have semantic value in ruby?
[14:17:02] ytti: indentation does not have
[14:19:06] thejoecarroll: has joined #ruby
[14:20:08] dragoonis: I've seen references to food critic - unsure if this is recommended
[14:20:35] cdg: has joined #ruby
[14:25:13] fxa: has joined #ruby
[14:29:21] mim1k: has joined #ruby
[14:29:22] meshsmith: has joined #ruby
[14:29:57] bvcosta: has joined #ruby
[14:33:43] mathys: has joined #ruby
[14:35:28] theunraveler: has joined #ruby
[14:37:47] bvcosta: has joined #ruby
[14:39:12] Danny: has joined #ruby
[14:42:31] igniting: has joined #ruby
[14:42:45] PatrikasZvaigzde: has joined #ruby
[14:43:30] cam27: has joined #ruby
[14:49:52] centrx: has joined #ruby
[14:51:12] cschneid_: has joined #ruby
[14:51:34] cdg_: has joined #ruby
[14:51:41] cschneid_: has joined #ruby
[14:56:42] rippa: has joined #ruby
[14:57:35] rgiscard: has joined #ruby
[14:58:33] Mutter: has joined #ruby
[15:04:42] hightower2: has joined #ruby
[15:11:08] Mutter: has joined #ruby
[15:14:03] hutch34: has joined #ruby
[15:16:05] mikecmpbll: has joined #ruby
[15:16:54] mikecmpbll: how can i call the superclass's implementation of an overridden method, from another instance method in the subclass
[15:18:37] mim1k: has joined #ruby
[15:18:40] tenderlove: has joined #ruby
[15:19:07] aenialis: has joined #ruby
[15:19:23] mikecmpbll: e.g.: https://gist.github.com/mikecmpbll/e23c8a519dd193bcadc4b396f9dff35b
[15:20:05] ljarvis: mikecmpbll: you cant
[15:20:11] ljarvis: is the short answer
[15:20:12] mikecmpbll: ljarvis : fair enough :D
[15:20:24] type01: has joined #ruby
[15:20:46] mikecmpbll: guess i need to do some method aliasing.
[15:21:46] t-recx: has joined #ruby
[15:21:49] ljarvis: >> class A; def foo; "foo"; end; end; class B < A; def foo; "bar"; end; def bar; method(:foo).super_method.call; end; end; B.new.bar
[15:21:50] ruby[bot]: ljarvis: # => "foo" (https://eval.in/818981)
[15:22:09] ljarvis: that's Ruby 2.2+ though
[15:22:24] ljarvis: I would also question code that used that :)
[15:23:12] ljarvis: but yeah otherwise you can use some method aliasing
[15:24:45] Mutter: has joined #ruby
[15:26:40] synthroid: has joined #ruby
[15:27:00] hutch34: has joined #ruby
[15:27:11] kasisnu: has joined #ruby
[15:29:13] ascarter: has joined #ruby
[15:29:32] synthroid: has joined #ruby
[15:30:32] raul782: has joined #ruby
[15:31:49] Mutter: has joined #ruby
[15:33:00] cadillac__: has joined #ruby
[15:34:44] synthroid: has joined #ruby
[15:36:31] synthroid: has joined #ruby
[15:37:18] Kug3lis: has joined #ruby
[15:43:24] Nuru: has joined #ruby
[15:44:20] chalkmonster: has joined #ruby
[15:46:13] enterprisey: has joined #ruby
[15:46:16] nankyokusei: has joined #ruby
[15:48:50] username1: has joined #ruby
[15:49:14] bvcosta: has joined #ruby
[15:53:55] brent__: has joined #ruby
[15:54:06] ndrst: has joined #ruby
[15:54:23] ineb: mikecmpbll: here is another truth https://paste.xinu.at/7zE9/
[15:54:52] mikecmpbll: ineb : 😲 naisss.
[15:55:23] mikecmpbll: that'll do perfectly :p ty
[15:56:48] ljarvis: dont do that if you are on ruby 2.2+ or can alias methods
[15:56:57] ljarvis: that's the worst way to do if of all possible ways
[15:57:41] ineb: i would not suggest it either
[15:58:09] hobodave: has joined #ruby
[15:58:29] Mutter: has joined #ruby
[16:01:07] patarr1: has joined #ruby
[16:01:10] Cohedrin: has joined #ruby
[16:02:02] Mutter: has joined #ruby
[16:03:25] ineb: however, it is part of the language. methods can be treated like blocks , procs, lambdas and therefore can be bind/unbind, passed around and called in whatever context you like
[16:05:11] ineb: and it can be useful, for example in autoloading systems
[16:05:18] ineb: like active support
[16:09:17] joonty: has joined #ruby
[16:10:36] ozcanesen: has joined #ruby
[16:11:37] Silthias: has joined #ruby
[16:12:12] nitric: has joined #ruby
[16:13:34] cam27_: has joined #ruby
[16:14:28] brent__: has joined #ruby
[16:17:35] Mutter: has joined #ruby
[16:18:36] burgestrand: has joined #ruby
[16:20:24] el_ocho[m]: has joined #ruby
[16:20:43] marxarelli: has joined #ruby
[16:22:33] dionysus69: has joined #ruby
[16:22:36] yokel: has joined #ruby
[16:24:21] ivanskie: has joined #ruby
[16:24:34] Mutter: has joined #ruby
[16:24:49] ivanskie: is it possible to check which platform ruby is running in, and do a require '' based on that?
[16:24:59] ljarvis: ivanskie: yep
[16:25:46] type01: has joined #ruby
[16:26:17] rgiscard: has joined #ruby
[16:27:38] hobodave: has joined #ruby
[16:27:49] synthroid: has joined #ruby
[16:27:56] mikecmpbll: i prefer the worst ways to do things
[16:28:00] mikecmpbll: way more fun that way.
[16:28:54] MrBismuth: has joined #ruby
[16:30:05] gusrub: has joined #ruby
[16:30:06] ohjn__: has joined #ruby
[16:31:36] patarr: has joined #ruby
[16:32:19] baweaver: mikecmpbll: #perl is over thataway <-
[16:32:45] eightlimbed: has joined #ruby
[16:32:54] dminuoso: mikecmpbll: worst-case program.
[16:33:54] amclain: has joined #ruby
[16:37:27] dviola: has joined #ruby
[16:40:24] GodFather: has joined #ruby
[16:42:22] patarr: has joined #ruby
[16:43:13] ryzokuken_: has joined #ruby
[16:47:32] uZiel: has joined #ruby
[16:47:56] ivanskie: speaking of scope... how can I create a logger thing. that is accessible anywhere in the app?
[16:48:37] ivanskie: i already have a support module which has methods available everywhere. but im just scratching my head how can I still be able to do logger.info() or logger.warn().. etc etc
[16:49:02] duderonomy: has joined #ruby
[16:49:15] ivanskie: you can't do logger.{sev}(msg) can you?
[16:49:47] ivanskie: google doesn't seem to be helping right now or im just not asking the right question
[16:51:02] patarr: has joined #ruby
[16:53:15] ivanskie: oooh mixlib-log
[16:58:23] Eiam: has joined #ruby
[16:58:35] Mutter: has joined #ruby
[17:00:18] im0nde: has joined #ruby
[17:03:09] Emmanuel_Chanel: has joined #ruby
[17:05:23] Mutter: has joined #ruby
[17:05:24] Rodya_: has joined #ruby
[17:08:36] A-ron: has joined #ruby
[17:09:58] tenderlove: has joined #ruby
[17:10:56] Silthias: has left #ruby: ()
[17:11:07] solocshaw: has joined #ruby
[17:12:12] resnik2: has joined #ruby
[17:12:21] __Yiota: has joined #ruby
[17:13:00] Dimik: has joined #ruby
[17:13:02] resnik2: Trying to read a bundle of certs via openssl routines. It seems I'm missing something.
[17:13:51] jinie_: has joined #ruby
[17:14:44] coderhut: has joined #ruby
[17:16:07] skweek: has joined #ruby
[17:16:30] psychicist__: has joined #ruby
[17:21:50] daivyk: has joined #ruby
[17:27:02] andrzejku: has joined #ruby
[17:27:27] patarr: has joined #ruby
[17:27:51] nrk: has joined #ruby
[17:30:36] joelwallis: has joined #ruby
[17:35:20] aenialis: has joined #ruby
[17:37:04] gusrub: has joined #ruby
[17:43:17] ryzokuken_: has joined #ruby
[17:45:27] __Yiota: has joined #ruby
[17:47:59] patarr: has joined #ruby
[17:48:31] Hunter1: has joined #ruby
[17:49:04] millerti: has joined #ruby
[17:50:41] kies: has joined #ruby
[17:52:42] lmc: has joined #ruby
[17:54:28] im0nde: has joined #ruby
[17:55:32] hobodave: has joined #ruby
[17:58:45] DLSteve: has joined #ruby
[17:59:18] meshsmith: has joined #ruby
[18:01:03] Vingador: has joined #ruby
[18:02:49] patarr: has joined #ruby
[18:04:09] cam27: has joined #ruby
[18:04:29] hobodave_: has joined #ruby
[18:05:22] gmoney: has joined #ruby
[18:06:45] PaulCapestany: has joined #ruby
[18:09:05] workmad3_: has joined #ruby
[18:09:24] sysvalve: has joined #ruby
[18:10:27] mitt3ns: has joined #ruby
[18:10:59] atom3_: has joined #ruby
[18:11:07] solocshaw1: has joined #ruby
[18:11:52] ForeignBiscuit: has joined #ruby
[18:12:05] ben_h: has joined #ruby
[18:12:36] marr123: has joined #ruby
[18:12:38] peteretep_: has joined #ruby
[18:12:47] Aeyris_: has joined #ruby
[18:13:00] valentin: has joined #ruby
[18:13:04] dukedave_: has joined #ruby
[18:13:14] stephenh_: has joined #ruby
[18:13:54] err_ok_: has joined #ruby
[18:13:55] wsmoak_: has joined #ruby
[18:14:02] ewilliam____: has joined #ruby
[18:14:17] Murda: has joined #ruby
[18:14:52] _DanN_: has joined #ruby
[18:14:53] async_pr1: has joined #ruby
[18:14:57] rprimus_: has joined #ruby
[18:15:05] birdyond1ugs: has joined #ruby
[18:15:28] saschavo1d: has joined #ruby
[18:15:38] unreal_: has joined #ruby
[18:15:40] Radich: has joined #ruby
[18:16:51] jottr_: has joined #ruby
[18:17:36] gix-: has joined #ruby
[18:17:50] znz_jp0: has joined #ruby
[18:18:19] x0F: has joined #ruby
[18:18:26] BackEndCoder_: has joined #ruby
[18:18:32] rideh-: has joined #ruby
[18:18:33] lel-: has joined #ruby
[18:18:33] canton7_: has joined #ruby
[18:18:39] kitallisii: has joined #ruby
[18:18:40] Bilge-: has joined #ruby
[18:18:48] omninonsense: has joined #ruby
[18:18:49] unsymbol_: has joined #ruby
[18:18:50] DarkArc: has joined #ruby
[18:19:00] leonthemisfit_: has joined #ruby
[18:19:01] nfsnobody-: has joined #ruby
[18:19:59] Elysia: has joined #ruby
[18:20:05] \13k: has joined #ruby
[18:20:35] aredridel: has joined #ruby
[18:20:48] cbrad: has joined #ruby
[18:21:09] akkad: has joined #ruby
[18:22:09] mlehrer: has joined #ruby
[18:22:21] ejnahc: has joined #ruby
[18:22:27] giraffe: has joined #ruby
[18:22:31] rileyy: has joined #ruby
[18:22:52] nadir: has joined #ruby
[18:22:56] gbailey: has joined #ruby
[18:24:19] user: has joined #ruby
[18:24:31] x0F: has joined #ruby
[18:24:40] iamayam: has joined #ruby
[18:24:41] DK2: has joined #ruby
[18:24:44] duracrisis: has joined #ruby
[18:24:46] radic: has joined #ruby
[18:24:58] ResidentBiscuit: has joined #ruby
[18:25:03] klaas: has joined #ruby
[18:25:03] _moep_: has joined #ruby
[18:25:04] ujjain: has joined #ruby
[18:25:04] nebiros: has joined #ruby
[18:25:04] ujjain: has joined #ruby
[18:25:34] BTRE: has joined #ruby
[18:25:46] SCHAPiE: has joined #ruby
[18:25:46] sparr: has joined #ruby
[18:26:02] el_ocho[m]: has joined #ruby
[18:26:24] burgestrand: has joined #ruby
[18:27:02] aenialis: has joined #ruby
[18:27:15] balazs_: has joined #ruby
[18:27:21] voltai[m]: has joined #ruby
[18:27:37] heftig: has joined #ruby
[18:29:06] bkutil: has joined #ruby
[18:29:23] snapcase: has joined #ruby
[18:30:18] Vircung: has joined #ruby
[18:31:14] vqrs: has joined #ruby
[18:31:59] jenrzzz: has joined #ruby
[18:31:59] jenrzzz: has joined #ruby
[18:34:13] mtkd: has joined #ruby
[18:34:40] nupizdets: has joined #ruby
[18:34:59] bvcosta: has joined #ruby
[18:35:23] nobitanobi: has joined #ruby
[18:36:24] Danny: has joined #ruby
[18:36:40] infernix: has joined #ruby
[18:39:49] im0nde: has joined #ruby
[18:42:04] duderonomy: has joined #ruby
[18:44:07] BSaboia: has joined #ruby
[18:46:36] uZiel: has joined #ruby
[18:47:25] roshanavand: has joined #ruby
[18:49:29] ResidentBiscuit: has joined #ruby
[18:51:48] graft: has joined #ruby
[18:54:38] harfangk: has joined #ruby
[18:54:40] Cohedrin: has joined #ruby
[18:54:47] ketan: has joined #ruby
[18:55:38] lmc: has joined #ruby
[18:56:28] konsolebox: has joined #ruby
[18:58:34] patarr: has joined #ruby
[18:58:44] im0nde: has joined #ruby
[19:01:08] MarkBilk_: has joined #ruby
[19:02:39] im0nde: has joined #ruby
[19:02:49] TomyLobo2: has joined #ruby
[19:02:52] lmc: has joined #ruby
[19:03:20] dionysus69: has joined #ruby
[19:03:47] andrzejku: has joined #ruby
[19:04:46] Dimik: has joined #ruby
[19:06:11] brent__: I need to right a rspec test for a class method, and however need to stub out what goes on inside that method, whats being called and what variables should be assigned inside the method i'm testing. I can't seem to find any good resource on how to stub out stuff inside the method you are calling
[19:07:15] bvcosta: has joined #ruby
[19:08:07] jenrzzz: has joined #ruby
[19:08:07] jenrzzz: has joined #ruby
[19:11:23] brent__: https://gist.github.com/brentluna/ae6e70e50a5516395fdd3c835784390d is the method i'm trying to test
[19:12:12] selu: has joined #ruby
[19:12:20] hutch34: has joined #ruby
[19:12:22] elomatreb: brent__: A common pattern for testing methods like that is extracting the request into a dedicated method, which you can easily stub
[19:12:49] cam27: has joined #ruby
[19:13:15] skweek: has joined #ruby
[19:14:55] brent__: elomatreb: so move that HTTParty line to a method that i can stub out a repsonse?
[19:15:05] elomatreb: And the rescue, yeah
[19:16:28] brent__: i'm still not quite sure how to assign that stub of the httparty method when calling the main method
[19:16:49] TomyLobo3: has joined #ruby
[19:18:43] gigetoo: has joined #ruby
[19:20:13] nupizdets: has joined #ruby
[19:26:57] ineb: i want a class which auto initializes with certain members with certain values. then on initialize there are required parameters and optional parameters which will use the provided default values in that class. i came up with this but i dont know if its a bad idea or if there are simpler solutions https://paste.xinu.at/S4M/
[19:28:21] ineb: i think this could go in a module named 'initializable' or so. so a class can include it and only needs to provide some DEFAULT_OPTS and required parameters.
[19:32:21] hahuang65: has joined #ruby
[19:32:47] meshsmith: has joined #ruby
[19:34:22] elomatreb: ineb: One problems with solutions like that is that they silently ignore invalid (e.g. typoed) params
[19:36:40] dropsh0t: ineb: and you can't override getters or setters.
[19:36:57] dropsh0t: I've seen that pattern used before. I just think it's messy/lazy.
[19:38:04] elomatreb: Most of the times if you have that many parameters your class is doing too much anyway
[19:38:26] ineb: its only for configuration
[19:39:05] ineb: but with some control over the settings
[19:39:12] bvcosta: has joined #ruby
[19:40:30] dropsh0t: Use a Struct or something
[19:41:09] ineb: wasnt able to do it with only mentioning the parameters once.
[19:41:32] kies: has joined #ruby
[19:41:33] ineb: could be done with splat now that i think of it tough
[19:43:47] simmaniac: has joined #ruby
[19:44:18] TomyLobo: has joined #ruby
[19:49:27] weathermaker: has joined #ruby
[19:52:59] postmodern: has joined #ruby
[19:53:45] workmad3: has joined #ruby
[19:54:09] ResidentBiscuit: has joined #ruby
[19:54:11] gigetoo: has joined #ruby
[19:54:43] bvcosta: has joined #ruby
[19:56:28] mniip: has joined #ruby
[19:57:44] lxsameer: has joined #ruby
[19:58:01] cschneid_: has joined #ruby
[19:58:08] jenrzzz: has joined #ruby
[19:58:08] jenrzzz: has joined #ruby
[19:59:32] brent__: has joined #ruby
[19:59:53] Danny: has joined #ruby
[19:59:55] ineb: another brilliant solution for the same problem: https://paste.xinu.at/BvC1/
[20:00:03] brent__: has joined #ruby
[20:01:18] ineb: yes, there is no returning from meta hell now.
[20:01:47] burgestrand: has joined #ruby
[20:01:59] ineb: at least its clear which parameters are required and which are optional
[20:03:00] xall: has joined #ruby
[20:05:00] Mutter: has joined #ruby
[20:05:01] spheric: has joined #ruby
[20:05:52] brent__: has joined #ruby
[20:08:47] bvcosta: has joined #ruby
[20:12:20] Mutter: has joined #ruby
[20:14:11] bvcosta: has joined #ruby
[20:16:01] kies: has joined #ruby
[20:17:27] shinnya: has joined #ruby
[20:17:49] Mutter: has joined #ruby
[20:19:41] PonyDevil: has joined #ruby
[20:22:41] andrzejku: has joined #ruby
[20:26:15] workmad3: has joined #ruby
[20:26:17] jenrzzz: has joined #ruby
[20:32:35] nickjj_: has joined #ruby
[20:34:04] zapata: has joined #ruby
[20:36:54] muelleme_: has joined #ruby
[20:38:00] omab: has joined #ruby
[20:42:02] brent__: has joined #ruby
[20:53:34] Mutter: has joined #ruby
[20:55:38] ketan: has joined #ruby
[20:58:06] jjunior_: has joined #ruby
[21:01:30] MarkBilk__: has joined #ruby
[21:02:27] ascarter: has joined #ruby
[21:02:45] ahrs: has joined #ruby
[21:03:11] patarr1: has joined #ruby
[21:03:43] GodFather: has joined #ruby
[21:04:27] bvcosta: has joined #ruby
[21:08:11] ur5us: has joined #ruby
[21:09:34] ktreese: has joined #ruby
[21:13:05] ktreese: Anyone help me on outputting some variables? My end goal is to output the original hostname, and next to it, the modified value. Ideally, I'd really like to line everything up in a column, but if that's asking too much, then just getting the output for each line side by side would be nice
[21:13:06] ktreese: https://gist.github.com/ktreese/d22a22136184081e19fbda92b214ac4f
[21:15:33] ljarvis: ktreese: you want String#format / String#% or sprintf. You'll have to best guess the widest hostname, though. Otherwise your best shot is to collect them all and keep track of the longest, then pad out the rest when you print them
[21:16:57] ljarvis: also you can reduce the 2 branches into 1 that just removes those prefixes
[21:17:22] ktreese: ok -- looks like 55 is my longest length
[21:18:40] ljarvis: ktreese: puts "%-55s %s" % ["foo", "bar"]
[21:21:04] ktreese: ljarvis: thx. How do I handle the $2 variables?
[21:21:10] bougyman: has joined #ruby
[21:21:10] bougyman: has joined #ruby
[21:21:49] mc_fail_: has joined #ruby
[21:21:49] herwin: has joined #ruby
[21:21:50] arvindsa-: has joined #ruby
[21:21:51] sysanthrope: has joined #ruby
[21:21:54] edgr: has joined #ruby
[21:21:54] jtd: has joined #ruby
[21:21:56] Muz_: has joined #ruby
[21:21:56] pskosinski: has joined #ruby
[21:21:58] ljarvis: ktreese: what do you mean?
[21:21:58] inukshuk: has joined #ruby
[21:21:59] scott4000: has joined #ruby
[21:22:07] gil_: has joined #ruby
[21:22:07] gil_: has joined #ruby
[21:22:11] hsiktas: has joined #ruby
[21:22:11] RealMarc: has joined #ruby
[21:22:24] knowtheory: has joined #ruby
[21:22:35] graingert: has joined #ruby
[21:22:41] jpinnix: has joined #ruby
[21:22:46] eregon: has joined #ruby
[21:23:15] ktreese: ljarvis: nm. I meant like this. puts "%-55s %s" % [hostname, $2]
[21:23:34] g3funk: has joined #ruby
[21:23:41] edwardly: has joined #ruby
[21:23:41] edwardly: has joined #ruby
[21:24:59] ljarvis: ktreese: yes, that's correct
[21:25:21] ktreese: ljarvis: thank you for the help! This gets me what I need :)
[21:26:27] uranellus: has joined #ruby
[21:26:27] uranellus: has joined #ruby
[21:26:41] dyyylan: has joined #ruby
[21:26:47] bokayio: has joined #ruby
[21:26:52] skweek: has joined #ruby
[21:26:52] TinkerTyper: has joined #ruby
[21:27:40] Guest80106: has joined #ruby
[21:27:49] velu_aon[m]: has joined #ruby
[21:28:17] torarne: has joined #ruby
[21:28:20] mim1k: has joined #ruby
[21:28:23] ktreese: ljarvis: I am intrigued by reducing the 2 branches into 1. I'm new to ruby, so what does that mean?
[21:28:53] ljarvis: ktreese: line 5 checks for the presence of some prefixes and then proceeds to remove them in the output, correct?
[21:29:22] Dimik: has joined #ruby
[21:29:25] ljarvis: ktreese: so, check your 2 regexps. They look almost identical, except for this part, right? "(vgt|dev|test|prod|tst|prd)"
[21:29:34] ljarvis: so, all your code is doing is removing those. Nothing more
[21:30:25] ktreese: ah -- yes. I'm doing this because some of our legacy hostnames do not have the listed prefixes, thus won't match
[21:30:40] ljarvis: your regexp on line 7 would match the same string the previous regexp would match, and it's much more simple; so I say just keep that one, and remove those prefixes if they exist when you print the output
[21:31:49] ktreese: I see -- cool. I'd have to figure out how to do that
[21:31:59] patarr: has joined #ruby
[21:32:54] ljarvis: yep :-) anyway, if there's more code you need inside those branches, then you'd better leave it, but if it's this simple, then there's no point in multiple branches when the second branch condition is just a slightly simplified version of the first, and the branch body is almost identical
[21:34:04] ktreese: :ljarvis makes sense. I'll consider refactoring. What I'm doing here is building a role fact for Puppet based on the hostname of the machine
[21:34:13] codelurker: has joined #ruby
[21:35:10] ljarvis: cool. Btw, another suggestion: you can use `File.foreach(filename) do |line|` instead of open + each_line
[21:35:36] ktreese: sweet -- much cleaner. I like it! thx
[21:38:04] eightlimbed: has joined #ruby
[21:38:24] hutch34: has joined #ruby
[21:42:48] ascarter: has joined #ruby
[21:48:47] ktreese: ljarvis: would removing the prefixes be along the lines of using something like a sed?
[21:49:33] ktreese: like a slice?
[21:51:02] willc: has joined #ruby
[21:53:26] Danny: has joined #ruby
[21:54:31] bobasfs: has joined #ruby
[22:02:59] willc: has left #ruby: ()
[22:04:32] millerti: has joined #ruby
[22:07:35] pale3: has joined #ruby
[22:07:51] Muz: has joined #ruby
[22:09:35] bvcosta: has joined #ruby
[22:10:15] cadillac__: has joined #ruby
[22:13:41] a-person: has joined #ruby
[22:15:33] nacsurte: has joined #ruby
[22:15:53] nacsurte: how can i read a stringIO object with open()
[22:16:05] nacsurte: or is that just not possible
[22:16:58] cschneid_: has joined #ruby
[22:21:17] kobain: has joined #ruby
[22:22:05] aef: has joined #ruby
[22:26:59] Guest80106: has joined #ruby
[22:28:58] minimalism: has joined #ruby
[22:30:47] sepp2k: has joined #ruby
[22:34:02] jphase: has joined #ruby
[22:38:30] Mutter: has joined #ruby
[22:42:38] yorickpeterse: nacsurte: I don't think that's possible no
[22:43:20] Mutter: has joined #ruby
[22:43:59] weathermaker: has joined #ruby
[22:49:18] mikecmpbll: has joined #ruby
[22:54:32] sepp2k: has joined #ruby
[22:56:31] ketan: has joined #ruby
[22:58:30] jphase: has joined #ruby
[23:01:32] aarwine: has joined #ruby
[23:02:56] omab: has joined #ruby
[23:04:07] aarwine: I'm trying to track games, the players, and the results of the games. For this I've been trying to learn active record. Do these models look reasonable? https://gist.github.com/arwineap/afb15c4faabd49607f231d2f82d0ca5c
[23:04:17] aarwine: ( 12 lines )
[23:05:41] bsamorim: has joined #ruby
[23:06:12] Vingador: has joined #ruby
[23:06:26] ascarter: has joined #ruby
[23:09:17] mrconfused: has joined #ruby
[23:14:30] Danny: has joined #ruby
[23:15:40] mrconfused_: has joined #ruby
[23:20:58] meshsmith: has joined #ruby
[23:22:16] ule: has joined #ruby
[23:24:20] weathermaker: has joined #ruby
[23:24:35] havenwood: aarwine: Your Game doesn't belong_to :player.
[23:24:48] havenwood: I mean, there's a missing belong_to.
[23:25:05] havenwood: aarwine: There's a RubyOnRails channel too for Rails-specific stuff.
[23:25:08] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:25:11] aarwine: Ok, I'll hop over
[23:26:07] nowhere_man: has joined #ruby
[23:27:22] znz_jp: has joined #ruby
[23:28:44] mim1k: has joined #ruby
[23:29:11] herbmillerjr: has joined #ruby
[23:30:20] workmad3_: has joined #ruby
[23:31:07] cadillac__: has joined #ruby
[23:32:26] hightower2: has joined #ruby
[23:34:48] cfec0b8d: has joined #ruby
[23:40:37] hutch34: has joined #ruby
[23:42:43] fullmoonpie: has left #ruby: ("Leaving")
[23:46:40] w0b: has joined #ruby
[23:47:56] enterprisey: has joined #ruby
[23:48:03] arescorpio: has joined #ruby
[23:49:19] hutch34: has joined #ruby
[23:50:04] roshanavand: has joined #ruby
[23:51:29] milardovich: has joined #ruby
[23:53:59] cagmz: has joined #ruby