ruby
How can I get Sinatra to return a record matching today's date?
M开发者_运维百科y Sinatra app is a collection of notes. Each note is assigned a (future) date when it should be published:[详细]
2023-04-13 07:52 分类:问答How do I implement a basic Enumerator class?
I am trying to understand how Enumerator class works. Specifically, I do not know how the yielder object is created and passed to the code block that the constructor takes.[详细]
2023-04-13 07:46 分类:问答Why am I not able to install Ruby 1.9.2 on Mac OSX Lion? [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.[详细]
2023-04-13 07:45 分类:问答Rails how to allways gsub column before save?
I am trying to make gsub on my column before save or update. Here is my controller: def dansk(text) self.text.gsub(\'å\', \'å\')[详细]
2023-04-13 07:37 分类:问答When might a dispatch table be as good as method_missing in Ruby?
Are there any situations where a dispatch table, implemented as a hash of lambdas, might be as good, if not better, than over-riding Ruby\'s method_missing?I\'m asking because I used this technique to[详细]
2023-04-13 07:10 分类:问答How do I create a class which instance can be evaluated as false? [duplicate]
This question already has answers here: How to inherit from NilClass or how to simulate similar function[详细]
2023-04-13 07:09 分类:问答Use Ruby to copy files into an jar file
my problem is that I want to add some .class files from a normal directory into an .jar file. Do I have to extract it before or can I add开发者_如何转开发 the files \"on the fly\"?Although I agree wit[详细]
2023-04-13 06:58 分类:问答Array method that accepts an index and returns a new array with the item at the index removed
\'delete_at\' and \'slice\' remove the item at the index and return that item. But 开发者_StackOverflow社区I don\'t really care about the removed item. I just want a new array with that item removed.[详细]
2023-04-13 06:49 分类:问答Ruby wrapper for libjpeg to resize image
is there a ruby wrapper for the libjpeg library (http://www.ijg.org/)? What I\'m开发者_如何学运维 trying to do is create an extension to the Rhomobile Framework so that I can resize images on my mobil[详细]
2023-04-13 06:41 分类:问答Running both MongoDB and Mysql on Rails 2.3.6
In Rails 2.3.6 I\'m trying to use both MongoDb via MongoMapper and Mysql on the same application. I\'ve seen several others question about this but I cannot find how to configure rails to use bo开发者[详细]
2023-04-13 06:41 分类:问答