{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

Ruby元编程(第2版)

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

Ruby元编程(第2版)

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Editer Recommend

元编程是Ruby世界的如意金箍棒,只有能驾驭它的人才能充分发挥其潜力。
《Ruby元编程(第2版)》在大量剖析实例代码的基础上,详细讲解了33种元编程技巧。
读者不仅能学到对象模型、作用域、单件类、代码块等元编程概念,还将学习Rails的组织结构和工作原理,以及如何借助元编程编写领域专属语言。
第2版更新Ruby 2.0、Ruby 2.1内容,大部分示例代码取自流行的软件框架和类库,包括Rails4。
Content Description

《Ruby元编程(第2版)》在大量剖析实例代码的基础上循序渐进地介绍Ruby特有的实用编程技巧。通过分析案例、讲解例题、回顾Ruby类库的实现细节,作者不仅向读者展示了元编程的优势及其解决问题的方式,更详细列出33种发挥其优势的编程技巧。本书堪称动态语言设计模式。Ruby之父松本行弘作序推荐。
Author Description

Paolo Perrotta,有超过15年的软件设计和开发经验,他开发过嵌入式软件、企业级软件、计算机游戏和web应用,还发表过上百篇技术文章。他在欧洲各国教授敏捷课程,过着游牧般的生活。
Catalogue

第一部分 Ruby元编程
第1章 元这个字眼
1.1 鬼城与自由市场
1.2 程序员Bob的故事
1.3 元编程和Ruby
第2章 星期一:对象模型
2.1 打开类
2.2 类的真相
2.3 小测验:缺失的连接线
2.4 调用方法时发生了什么?
2.5 小测验:混乱的模块
2.6 对象模型小结
第3章 星期二:方法
3.1 代码繁复的问题
3.2 动态方法
3.3 method_missing方法
3.4 小测验:消灭Bug
3.5 白板类
3.6 小结
第4章 星期三:代码块
4.1 学习代码块
4.2 小测验:Ruby的#符号
4.3 代码块是闭包
4.4 instance_eval方法
4.5 可调用对象
4.6 编写领域专属语言(DSL)
4.7 小测验:改良的DSL
4.8 小结
第5章 星期四:类定义
5.1 揭秘类定义
5.2 小测验:Taboo类
5.3 单件方法
5.4 单件类
5.5 小测验:模块的麻烦
5.6 方法包装器
5.7 小测验:打破数学规律
5.8 小结
第6章 星期五:编写代码的代码
6.1 通向周末的编程之路
6.2 Kernel#eval方法
6.3 小测验:校验过的属性(第一步)
6.4 小测验:校验过的属性(第二步)
6.5 小测验:校验过的属性(第三步)
6.6 小测验:校验过的属性(第四步)
6.7 钩子方法
6.8 小测验:校验过的属性(第五步)
6.9 小结
第7章 尾声
第二部分 Rails中的元编程
第8章 准备Rails之旅
8.1 Ruby on Rails
8.2 安装Rails
8.3 Rails源代码
第9章 Active Record的设计
9.1 简短的Active Record示例
9.2 Active Record的组成
9.3 经验之谈
第10章 Active Support的Concern模块
10.1 Concern模块出现之前
10.2 ActiveSupport::Concern模块
10.3 经验之谈
第11章 alias_method_chain方法沉浮录
11.1 alias_method_chain方法的兴起
11.2 alias_method_chain方法的衰亡
11.3 经验之谈
第12章 属性方法的发展
12.1 属性方法实战
12.2 属性方法的发展史
12.3 经验之谈
第13章 最后的思考
元编程不过是编程
第三部分 附录
附录A 常见惯用法
A.1 拟态方法
A.2 空指针保护
A.3 Self Yield
A.4 Symbol#to_proc方法
附录B 领域专属语言
B.1 关于领域专属语言
B.2 内部和外部领域专属语言
B.3 领域专属语言和元编程
附录C 法术手册
索引
Book Abstract

元编程……听起来很酷!好像是一种用于高级企业架构的设计方法。
事实上,元编程并非一个抽象的概念,它是一系列务实的编程技巧。在Ruby中,你可以用它完成如下一些工作。
假设你要写一个Ruby程序来连接外部系统(web服务或者Java程序),你可以用元编程写一个包装器用于接受任何方法的调用,然后把这些调用转发给外部系统。如果某人后来为这个外部系统添加了方法,即使不修改Ruby包装器,它也能自动支持新加入的方法。很神奇吧!
假设你遇到一类问题,需要设计某种领域专属语言来解决。如果你从头定义这门语言,并且自己编写解析器,工作量就太大了。你可以把Ruby改造成处理这个问题的专属语言。你甚至可以写一个简单的解释器从文件中读取这种基于Ruby语言的代码。
你可以把Ruby程序的简洁性提高到Java程序员做梦都不敢想的程度。比如一个包含20个方法的类,这些方法的名字看起来都差不多。元编程只用几行代码就能定义这些方法。如果你想调用一长串名字遵循一定的模式(比如名字都以test开头)的方法,元编程只用一行代码就能调用它们。
你可以改造Ruby使之满足你的需要,而不是去适应语言本身。例如,可以用你喜欢的方式增强任何一个类(包括Array这样的核心类);可以把想要监控的方法封装起来,当他人继承你的类后,就会执行你预先设定的代码……
……
Introduction

Ruby的很多特性继承自其他语言,这些语言包括Lisp、Smalltalk、C、Perl等。它的元编程特性来自于Lisp和Smalltalk。元编程有点像魔法,看起来让人震惊。世界上有两种的魔法:好的白魔法和坏的黑魔法。同样,元编程也有两面性:你可以用元编程增强语言的功能,还可以创建领域专属语言;但是你也可能陷入到元编程的陷阱里。元编程是一种容易让人迷惑的技术。
Ruby相信你是一位成熟的程序员,它赋予你元编程这样强大的能力。但是你必须记住:能力越大,责任就越大。
请尽情享受Ruby编程吧!
——松本行弘

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book