Manning the well grounded rubyist may 2009 ISBN 1933988657 pdf

519 46 0
Manning the well grounded rubyist may 2009 ISBN 1933988657 pdf

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Covers Ruby 1.9.1 David A Black MANNING The Well-Grounded Rubyist Licensed to sam kaplan Licensed to sam kaplan The Well-Grounded Rubyist DAVID A BLACK MANNING Greenwich (74° w long.) Licensed to sam kaplan For online information and ordering of this and other Manning books, please visit www.manning.com The publisher offers discounts on this book when ordered in quantity For more information, please contact Special Sales Department Manning Publications Co Sound View Court 3B Fax: (609) 877-8256 Greenwick, CT 06830 email: orders@manning.com ©2009 by Manning Publications Co All rights reserved No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine Manning Publications Co Sound View Court 3B Greenwich, CT 06830 Development editor: Copyeditor: Typesetter: Cover designer: Nermina Miller Tiffany Taylor Dottie Marsico Leslie Haimes ISBN 978-1-933988-65-8 Printed in the United States of America 10 – MAL – 14 13 12 11 10 09 Licensed to sam kaplan For Barbara Aronstein Black, and in memory of Charles L Black, Jr (1915-2001), with love Thanks for the writing genes Licensed to sam kaplan Licensed to sam kaplan brief contents PART RUBY FOUNDATIONS PART ■ Bootstrapping your Ruby literacy ■ Objects, methods, and local variables ■ Organizing objects with classes ■ Modules and program organization ■ The default object (self), scope, and visibility ■ Control-flow techniques 32 60 90 115 148 BUILT-IN CLASSES AND MODULES 183 ■ Built-in essentials 185 ■ Strings, symbols, and other scalar objects ■ Collection and container objects 10 ■ Collections central: Enumerable and Enumerator 11 ■ Regular expressions and regexp-based string operations 319 12 ■ File, I/O, and system operations 213 247 347 vii Licensed to sam kaplan 278 viii BRIEF CONTENTS PART RUBY DYNAMICS 373 13 ■ Object individuation 375 14 ■ Callable and runnable objects 15 ■ Callbacks, hooks, and runtime introspection 405 Licensed to sam kaplan 441 contents preface xix acknowledgments xxi about this book xxiv about the cover illustration xxx PART RUBY FOUNDATIONS 1 Bootstrapping your Ruby literacy 1.1 Basic Ruby language literacy Meet Interactive Ruby (irb), your new best friend A Ruby syntax survival kit The variety of Ruby identifiers Method calls, messages, and Ruby objects Writing and saving a sample program 10 Feeding the program to Ruby 11 Keyboard and file I/O 12 ■ ■ ■ ■ 1.2 Anatomy of the Ruby installation 14 The Ruby standard library subdirectory (Config::CONFIG["rubylibdir"]) 15 The C extensions directory (Config::CONFIG["archdir"]) 16 The site_ruby (Config::CONFIG[“sitedir”]) and vendor_ruby (Config::CONFIG["vendordir"]) directories 16 The gems directory 17 ■ ■ ■ ix Licensed to sam kaplan .. .The Well- Grounded Rubyist Licensed to sam kaplan Licensed to sam kaplan The Well- Grounded Rubyist DAVID A BLACK MANNING Greenwich... (and very new) at the time the book went to press Mind you, I don’t mean for Rails developers not to read The Well- Grounded Rubyist On the contrary: I’m optimistic that in the three years since... in the book and steered me away from making at least a generous handful of out-and-out mistakes The timeline of The Well- Grounded Rubyist encompassed the tenures of two marketing directors at Manning,

Ngày đăng: 19/04/2019, 13:40

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan