没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Michael
Fitzgerald
Ruby
Pocket
Reference
INSTANT HELP
FOR RUBY
PROGRAMMERS
2nd Edition
Ruby Pocket Reference
Fitzgerald
ISBN: 978-1-491-92601-7
US $14.99 CAN $17.99
Updated for Ruby 2.2, this handy reference oers brief yet clear explana-
tions of Ruby’s core elements—from operators to blocks to documentation
creation—and highlights the key features you may work with every day.
Need to know the correct syntax for a conditional? Forgot the name of that
String method? This book is organized to help you nd the facts fast.
Ruby Pocket Reference, 2nd Edition is ideal for experienced programmers
who are new to Ruby. Whether you’ve come to Ruby because of Rails,
or you want to take advantage of this clean, powerful, and expressive
language for other applications, this reference will help you easily pinpoint
the information you need.
You’ll nd detailed reference material for:
■ Keywords, operators, comments, numbers, and symbols
■ Variables, pre-dened global variables, and regular
expressions
■ Conditional statements, method use, classes, and
exception handling
■ Methods for the BasicObject, Object, Kernel, String, Array,
and Hash classes
■ Time formatting directives
■ New syntax since Ruby 1.9
Michael Fitzgerald is an author, coder, and novelist who has written
over 20 books. He is the author of O’Reilly’s Learning Ruby, Learning
XSLT, and XML Hacks, and co-author on the XML Pocket Reference.
oreilly.com, Twitter: @oreillymedia
Ruby Pocket Reference
PROGRAMMING LANGUAGES / RUBY
SECOND
EDITION
Michael
Fitzgerald
Ruby
Pocket
Reference
INSTANT HELP
FOR RUBY
PROGRAMMERS
2nd Edition
Ruby Pocket Reference
Fitzgerald
ISBN: 978-1-491-92601-7
US $14.99 CAN $17.99
Updated for Ruby 2.2, this handy reference oers brief yet clear explana-
tions of Ruby’s core elements—from operators to blocks to documentation
creation—and highlights the key features you may work with every day.
Need to know the correct syntax for a conditional? Forgot the name of that
String method? This book is organized to help you nd the facts fast.
Ruby Pocket Reference, 2nd Edition is ideal for experienced programmers
who are new to Ruby. Whether you’ve come to Ruby because of Rails,
or you want to take advantage of this clean, powerful, and expressive
language for other applications, this reference will help you easily pinpoint
the information you need.
You’ll nd detailed reference material for:
■ Keywords, operators, comments, numbers, and symbols
■ Variables, pre-dened global variables, and regular
expressions
■ Conditional statements, method use, classes, and
exception handling
■ Methods for the BasicObject, Object, Kernel, String, Array,
and Hash classes
■ Time formatting directives
■ New syntax since Ruby 1.9
Michael Fitzgerald is an author, coder, and novelist who has written
over 20 books. He is the author of O’Reilly’s Learning Ruby, Learning
XSLT, and XML Hacks, and co-author on the XML Pocket Reference.
oreilly.com, Twitter: @oreillymedia
Ruby Pocket Reference
PROGRAMMING LANGUAGES / RUBY
SECOND
EDITION
Michael Fitzgerald
Ruby Pocket Reference
SECOND EDITION
978-1-491-92601-7
[LSI]
Ruby Pocket Reference
by Michael Fitzgerald
Copyright © 2015 Michael Fitzgerald. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promo‐
tional use. Online editions are also available for most titles (http://safaribook‐
sonline.com). For more information, contact our corporate/institutional sales
department: 800-998-9938 or corporate@oreilly.com.
Editor: Brian MacDonald
Production Editors: Colleen Lobner and Nicole Shelby
Copyeditor: Gillian McGarvey
Proofreader: Kim Cofer
Indexer: WordCo Indexing Services
Interior Designer: David Futato
Cover Designer: Ellie Volckhausen
Illustrator: Rebecca Demarest
July 2007: First Edition
August 2015: Second Edition
Revision History for the Second Edition
2015-08-05: First Release
2015-10-23: Second Release
See http://oreilly.com/catalog/errata.csp?isbn=9781491926017 for release
details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Ruby
Pocket Reference, the cover image, and related trade dress are trademarks of
O’Reilly Media, Inc.
While the publisher and the author have used good faith efforts to ensure that
the information and instructions contained in this work are accurate, the
publisher and the author disclaim all responsibility for errors or omissions,
including without limitation responsibility for damages resulting from the use
of or reliance on this work. Use of the information and instructions contained
in this work is at your own risk. If any code samples or other technology this
work contains or describes is subject to open source licenses or the intellec‐
tual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
Table of Contents
Introduction 1
Conventions Used in This Book 1
Using Code Examples 2
Safari® Books Online 3
How to Contact Us 4
Acknowledgments 4
Running Ruby 5
Interactive Ruby (irb) 8
Ruby’s Keywords 14
Ruby’s Operators 17
Comments 19
Numbers 20
Variables 22
Symbols 24
Predened Global Variables 25
Keyword Literals 29
Global Constants 30
Ranges 31
Methods 32
Conditional Statements 41
iii
剩余223页未读,继续阅读
资源评论
xinconan2
- 粉丝: 268
- 资源: 400
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功