Is it okay to define a [] method in ruby’s NilClass?
Ruby by default does not include the method []
for NilClass
Classless tables possible with Datamapper?
I have an Item class with the following attributes:
Combining Ruby and C++
I’ve been discussing a conceptual project with a friend of mine and the the most effective way we’ve seen of doing it is writing the engine in C++ while the logic would be done in Ruby.
However, we would need data to be passed around often, for example:
Should tests be in the same Ruby file or in separated Ruby files?
While using Selenium and Ruby to do some functional tests, I am worried with the performance. So is it better to add all test methods in the same Ruby file, or I should put each one in separated code files?
How to execute a Ruby file in Java, capable of calling functions from the Java program and receiving primitive-type results?
I do not fully understand what am I asking (lol!), well, in the sense of if it is even possible, that is. If it isn’t, sorry.
What is a closure and how is it implemented in Ruby?
In the context of the Ruby programming language, what is a closure and when do you use one? What are the uses for it in Rails?
Does it make sense to create a Ruby wrapper to reference a Java object that does exactly the same thing?
I am using JRuby
.
How to fix bad fundamentals? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]
Setting up a simple RubyRails environment
I am coming from a .NET background and beginning my journey into the Mac OSXRubyRails environment.
Is there an idiom for a loop that executes some block of instructions between iterations? (In Ruby in particular)
I often need to do some operations in a loop and some other operations between the iterations. A simple example would be collecting words from an array into a string, spelled backwards and separated with commas. Is there an idiom or language support for this in any language? (For now i am mostly interested in Ruby.)