The Ruby language also has attributes (although they don't have a special name like "attributes" - they are one of many metaprogramming techniques Ruby offers).
Ruby语言也有属性(不过它们不像“属性”一样有特定名称—它们是Ruby提供的其中一种元程序设计方法)。
Languages with advanced metaprogramming capabilities, such as Ruby and Lisp, allow some testing tricks that other languages don't, such as easier access to mock objects.
具有高级元编程(metaprogramming)能力的语言,例如Rubyand Lisp,允许使用其他语言不支持的一些测试技巧,例如更容易访问mock对象。
The big thing that changed for me when I started coding in Ruby is my ability to produce and consume metaprogramming constructs.
当我开始用Ruby编写代码时,我受到的最大改变是产生和使用元编程结构的能力。
The point of this exercise isn't necessarily a deep dive into voodoo metaprogramming in Ruby, but rather to demonstrate what is possible in highly expressive languages.
此练习的目的并不是深入探讨Ruby中的充满魔力的元编程,而是演示表达性极佳的语言能实现哪些功能。
It is shown here for context; most of it is semi-advanced Ruby metaprogramming so I won't discuss it in detail.
其作用是提供上下文参考;其大多数内容都是比较高级的Ruby元编程,因此本文并不会详细讨论它。
Using a combination of Ruby reflection and metaprogramming, the columns of the table become properties of the object.
使用Ruby反射和元编程的组合,表的列可以变成对象的属性。
InfoQ: If you have your own interpreter, how does this interact with metaprogramming and other dynamic behavior of Ruby?
InfoQ:要是你们有自己的解释器,它如何支持元编程(metaprogramming)以及Ruby的其他动态特性?
The bulk of the Ruby class Calc USES Ruby's metaprogramming features to define functions at run time for all the digit keys and for the math operation keys.
大多数Ruby类Calc使用Ruby的元编程功能,在运行时为所有数字键和数学操作键定义功能。
The bulk of the Ruby class Calc USES Ruby's metaprogramming features to define functions at run time for all the digit keys and for the math operation keys.
大多数Ruby类Calc使用Ruby的元编程功能,在运行时为所有数字键和数学操作键定义功能。
应用推荐