First
|
Prev |
Next
|
Last
Pages: 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
Ruby class Hello all. I have two classes: class CartItem attr_reader :product, :quantity def initialize(product) @product = product @quantity = 1 end def increment_quantity @quantity += 1 end def title @product.title end def price @product.price * @quantity end end ... 26 Feb 2010 05:14
RubyZip help needed I am creating zip file using ruby zip there are two versions of creating the zip file 1st version part of class and in 2nd version running it alone. The kmz file created with 1st version doesn't contain complete text of LOC_0.kml Whereas the 2nd version does contain the complete file contents.. I.e. if LOC_0.kml ... 26 Feb 2010 11:53
Help on algorithm to calculate combinations Hello all I would like to find an algorithm to caclulate all options on the following problem. Lets suppose we have a room of max capacity of 4 persons. Which are the combinations of man - child in this room? some of them will be: empty room (none inside) 1 man 1 child 2 men 2 children 2 men 1 children 2 me... 25 Feb 2010 13:40
You dream API for a text editor Hi Friends, I am doing a bit of research for a project I am helping out with - a text editor - and the following question has been asked: what would your dream API look like and be capable of? Obviously, the API will be scriptable via Ruby. I'd be very interested to hear what you guys think. Many thanks,... 26 Feb 2010 18:40
WWW deprecation notice in Mechanize I'm a Ruby newbie trying to use scrubyt to extract text from a site. I have mechanize 1.0.0 installed and keep getting the following deprecation notice. Unfortunately, I'm not sure how to switch the WWW to mechanize, as it requests. I'm not actually calling mechanize anywhere in the code either. Many thanks in adva... 25 Feb 2010 14:48
Iterate over hash of nested hashes Hi, I'd like to be able to take a hash whose values are either hashes or some other object. If the values are hashes, I'd like to iterate over them and keep this up until the values aren't hashes. And I won't know how many level there will be until the program is running. Any suggestions? Thanks, Glenn ... 25 Feb 2010 03:40
Ocra: "Failed to create directory" I just ran into this exact problem. I fixed my particular problem. Here is what I did. I found that I could compile some scripts (even complex ones) but not others. I finally realized what the problem was. It appears ocra can't handle if your script changes the working directory in the script. I believe orca... 24 Feb 2010 17:41
results are different by running script via irb and ruby Hey, I am new to ruby. I have the following simple ruby script def make_show_name(show) return Proc.new {|host| show + " with " + host} end show = make_show_name("Practical Cannibalism") show.call("H. Annabellector") when run this using irb, it prints out: Practical Cannibalism with H. Annabellector but ... 24 Feb 2010 10:49
Launching a commamd prompt window from .rbw application How can I launch a command prompt window from within a .rbw application? I'd like, under certain circumstances, to allow output and input via a command prompt window/terminal window, but I don't want it launched at starupt, nor open all the time. --Alex -- Posted via http://www.ruby-forum.com/. ... 25 Feb 2010 11:23
Ruby on Rails application could not be started Hi, I'm upt o install retrospectiva on my centOS 5 machine. Therefore, i installed ruby 1.9.1 (ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]) and following gems: *** LOCAL GEMS *** actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activeresource (2.3.5) activesupport (2.3.5) fastthrea... 25 Feb 2010 04:45 |