If it were, I'd recommend The Ruby Way without reservation.
如果是,我就会毫不保留地推荐红宝石方式。
Think the ruby way: use type extensions; use blocks; use methods on objects.
用Ruby的方式思考:使用类型扩展;使用Block;在对象上使用方法。
In fact, perhaps part of the Ruby Way is that it is not a rigid and inflexible approach.
实际上,The Ruby Way的部分是它不是一个僵化,不灵活的方式。
The Rails framework includes a way to mix Ruby code with HTML templates, an idea that is similar to JSP and PHP.
Rails框架提供一种将Ruby代码与HTML模板混用的方法,这是一种类似于JSP和PHP的想法。
By executing the templates in this way, you expose the full power of the Ruby programming language to your templates.
通过这种方式执行这些模板,您将Ruby编程语言下的所有能力赋予了您的模板。
But these are fairly simple examples, just to give you a flavor for the way Ruby just does what you want it to.
但这些相当简单的实例,仅仅让您初步了解了Ruby完成您想要它做的事情的方式。
Clojure libraries inspired by Ruby libraries are one way the two languages interact.
Clojure库受Ruby库的启发,是这两种语言的相互影响的一种途径。
The asynchronous way requires to pass in a callback that is called once the Job is finished; in Ruby this is, of course, done with a block.
异步方式需要传递一个回调函数,一旦job完成工作便调用此函数;在Ruby中,这个当然是使用代码段来完成。
Any class in Ruby that supports the each method (like File) lets you iterate this way.
Ruby中支持each方法的任何类(比如File)都允许以这种方式进行迭代。
Ruby: I think, independent of the core battles that we're seeing, people are getting a greater appreciation of XML as a way of representing data to send back and forth.
Ruby:我认为,抛开我们所看到的核心之争不谈,XML作为一种表示要来回发送的数据的方法,其价值越来越受到人们的重视。
Along with the xml_objectify, PYX, and HaXml options examined in earlier installments, Ruby programmers also have a quick way of processing XML without a steep learning curve.
连同前几篇文章中研究的xml_objectify、PY x和HaXml选项一起,Ruby程序员还得到了一种处理xml的快速方法,而不必经历陡峭的学习曲线。
This article walks through a couple of simple Ajax examples and, along the way, shows you what makes the Ruby/Ajax combination so successful.
本文全面介绍了两个简单的Ajax例子,延着这个思路介绍了Ruby/Ajax 这一组合如此成功的原因。
Another way to get more performance is to look at other Ruby implementations, such as JRuby which profits from the maturity of GCs in modern JVMs.
提高性能的另一个方法是寻求其他的Ruby实现,比如得益于现代JVM中成熟GC的JRuby。
The Ruby source code is compiled into native machine code (same process as we do at runtime with the JIT compiler), so it's also a good way to obfuscate the source code.
因为Ruby源代码已经编译成了原生机器码(正如我们使用JIT编译器在运行时所做的一般),因此这也是混淆代码的一个不错的方式。
Well, we could spend days making our way through the perilous cavern dungeon levels to slay Lizalfos and king Dodongo in exchange for Goron's Ruby, but look - some fish!
我们可以花上好几天去穿越危险的大山洞地牢去干掉蜥蜴人和洞洞戈王,为了交换戈隆红宝石,但快看——有鱼!
MenTaLguY: My actors libraries simply associate a mailbox with every Ruby thread to make an actor of every one, but that isn't the only way to approach actors in Ruby.
我的actor库只是简单地把每个Ruby线程都关联一个信箱,这样每个线程都有了一个actor。但这并不是在Ruby中使用actor的唯一方式。
For example, you can easily write your own view class to change the way views are selected or rendered, or use a different database platform for models (the default is Ruby Sequel).
例如,你可以很容易编写自己的视图类来改变视图选择和渲染的方法,或者为模型换用另一个数据库平台(默认的Ruby的Sequel)。
Because Ruby does not require instance variable declaration, the simplest way to model instance variables is with a hash.
由于Ruby并不需要声明实例变量,因此建模实例变量最简单的方式就是使用散列。
A compiler, of course, needs a way to parse the input language, and so the XRuby team created their own Ruby parser using the popular ANTLR parser generator.
当然,编译器需要一种分析输入语言的方法,XRuby团队用流行的ANTLR分析器产生器创建了他们自己的Ruby分析器。
Matt's examples also show an easy to way use snippets of Ruby code as callbacks for the Objective-C application.
Matt的示例也展示了一种简便的方法,在Objective - C应用中使用一小段Ruby代码来作为回调。
Using the same techniques, you can extend any arbitrary Ruby class in the same way.
采用相同的技术,可以用相同的方式扩展任意的ruby类。
Right now, threads aren't very cool within the Ruby community but once native threading is supported, I suspect they will make a comeback because they will get way faster.
目前,在Ruby社区中线程还不是很火,但是一旦原生线程支持了以后,我断定它们会因为运行更快而迎来回归。
"Ruby gets out of your way," I've been hearing over the years, "so you can concentrate on your goals."
“Ruby语言帮你解决了很多事情,”这些年我听到的都是这样的话语,“因此你可以专注于实现你的目标。”
Ruby: I think the short answer to that is that I don't think anybody knows which way it's going.
Ruby:我想,对这个问题的简单回答是,我认为没有人知道它的未来方向。
InfoQ: MacRuby allows to AOT compile Ruby code - but is it possible to opt out of the Garbage Collector, ie. is there a way to just use Objective-C's reference counting memory management?
InfoQ:MacRuby允许使用AOT编译Ruby代码,那么,有没有可能不使用垃圾收集器,即能否仅仅使用Objective - c的引用计数内存管理?
Cake is a framework for PHP in the same way that Rails is for Ruby.
Cakephp是一个php框架就如同Rails对于Ruby。
What's the best way to handle more than 100 conditions in Ruby?
处理超过100的条件下红宝石的最好方式是什么?
It's true that Ruby is a beautiful girl, but the way she talks tends to ruffle people up the wrong way.
鲁比的确是个美丽的姑娘,但是她的说话方式往往使人恼火。
True, a pair of ruby slippers are what eventually helps her find her way back to Kansas from the land of Oz, but we think this indestructible outfit helped, too.
那双红宝石拖鞋最终帮助她从巫师王国回到堪萨斯,这是事实。不过我们觉得这条无敌的戏装也起了作用。
True, a pair of ruby slippers are what eventually helps her find her way back to Kansas from the land of Oz, but we think this indestructible outfit helped, too.
那双红宝石拖鞋最终帮助她从巫师王国回到堪萨斯,这是事实。不过我们觉得这条无敌的戏装也起了作用。
应用推荐