havenwood changed the topic of #ruby to: Ruby 3.4.1, 3.3.6 https://www.ruby-lang.org | Log https://libera.irclog.whitequark.org/ruby
CRISPR has joined #ruby
Linux_Kerio has quit [Ping timeout: 265 seconds]
CRISPR has quit [Ping timeout: 265 seconds]
CRISPR has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
CRISPR has quit [Ping timeout: 272 seconds]
jasfloss has quit [Ping timeout: 260 seconds]
Vonter has joined #ruby
jasfloss has joined #ruby
Munto has quit [Remote host closed the connection]
hwpplayer1 has joined #ruby
R2robot has quit [Quit: Pull the lever, Kronk. Wrong leverrrrrrr!]
R2robot has joined #ruby
Al2O3 has joined #ruby
cappy has joined #ruby
Linux_Kerio has joined #ruby
hwpplayer1 has quit [Quit: I'll be back later See you people !]
grenierm has joined #ruby
cappy has quit [Quit: Leaving]
<nakilon> I'm so struggling with OOP
<nakilon> if I simplify... imagine having a 'class Document' with some params that make sense when constructing it; then I want a method '.to_xml' that returns a String with a parameter 'user' that kinda makes sense for a library because you can explain that the 'user' param is added to the xml body; then I want a method '.to_zip' that would zip the xml, so
<nakilon> constructor; but in fact there are more params than just a user and it feels wrong to copypaste all the '@... = ...' from the Document constructor to XML constructor
<nakilon> I define a 'class XML < DelegateClass(::String)' to use it in the end of '.to_xml' method definition and in the 'def initialize' of the XML class I add the '@user = user'; but it appears that the zip archive has to include additional metadata taken from the 'user' that is an attribute of Document, i.e. it would need to explicitely pass it to XML
<nakilon> (missed the part that the idea is to have the '.to_zip' to be a method of the XML)
<nakilon> if I make '.to_zip' a method of Document, then it would make no sense to library user why he has to pass the 'user' param -- makes more sense to him only in the '.to_xml', and I want to hide the '.to_zip' internals knowledge from him
<nakilon> hide it without copypasting the constructor of Document to XML
konsolebox has joined #ruby
<nakilon> s / from the 'user' that is an attribute of Document / from both user (param of .to_xml) and params of the Document.new
<nakilon> TLDR: I want a method b() called on a String returned from a method a(..,) of my object O to be able to use params of both O.new(...) and a(...)
<nakilon> maybe '.to_zip' should be a private method of Document and I pass 'self' to XML.new?
<nakilon> or maybe I should define all these hundreds of lines of code within Document's initialize via Class.new, etc., having both params within a scope? that should work but coworkers and "less lines of code per method" magic thinker would not love
rvalue- has joined #ruby
rvalue has quit [Ping timeout: 265 seconds]
rvalue- is now known as rvalue
konsolebox has quit [Ping timeout: 276 seconds]
donofrio has joined #ruby
konsolebox has joined #ruby
Pixi` has joined #ruby
Pixi has quit [Read error: Connection reset by peer]
grenierm has quit [Ping timeout: 240 seconds]
user71 has joined #ruby
bougyman has quit [Ping timeout: 248 seconds]
donofrio has quit [Ping timeout: 244 seconds]
donofrio has joined #ruby
konsolebox has quit [Ping timeout: 244 seconds]
donofrio has quit [Ping timeout: 265 seconds]
lightstalker has joined #ruby
Furai has quit [Quit: WeeChat 4.5.1]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
Furai has joined #ruby
Furai has quit [Client Quit]
Furai has joined #ruby
hwpplayer1 has joined #ruby
georgemp has quit [Quit: ZNC - https://znc.in]
georgemp has joined #ruby
cappy has joined #ruby
teardown has quit [Ping timeout: 264 seconds]
teardown has joined #ruby
georgemp has quit [Quit: ZNC - https://znc.in]
georgemp has joined #ruby
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
georgemp has quit [Quit: ZNC - https://znc.in]
georgemp has joined #ruby
___nick___ has quit [Ping timeout: 272 seconds]
donofrio has joined #ruby
panickedGemstone has joined #ruby
<panickedGemstone> Hey guys, just getting back into Ruby from a looooong hiatus. I normally use Vim to edit my code, and Tmux and other tools to cobble together an IDE. I was wondering if a good "proper" IDE was available for Linux? Preferably free and open source? Maybe available in Ubuntu's repos?
<weaksauce> panickedGemstone best you will get on the free and open source is probably vscode or codium with ruby-lsp installed as an extension
<panickedGemstone> thanks
<weaksauce> not really an ide though but it has a lot of the features like debugging built in
<weaksauce> and some simple go to def
<weaksauce> the jet brains people have a ruby ide you can buy and a lot of people like that
<weaksauce> panickedGemstone also, since you like vim you can try the vscode neovim extension and that run a neovim instance that it uses to do all the normal mode/visual mode stuff and syncs the edits/position of the cursor to your screen... it's the best vim "emulation" i've seen in any editor
<panickedGemstone> ty, I know what I'm doing this weekend.
panickedGemstone has quit [Quit: Client closed]
hwpplayer1 has quit [Quit: bye]
user71 has quit [Quit: Leaving]
<intelligent_boat> vim does everything that I think I need, but is there anything that I don't know that I need?
<intelligent_boat> willing to be educated on it
<weaksauce> the ruby-lsp has a lot of nice features
donofrio has quit [Ping timeout: 272 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
cappy has quit [Quit: Leaving]