Date Once

1,102 views
992 views

Published on

Explanation of the method Date::once in the ruby core classes. This talk was originally given at the TSOT Ruby on Rails Project Night

Published in: Technology, Education
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,102
On SlideShare
0
From Embeds
0
Number of Embeds
29
Actions
Shares
0
Downloads
22
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Date Once

  1. 1. Inside Date.once Understanding some of the more interesting code in the Ruby core
  2. 2. The Problem
  3. 3. The Problem Instances of Date are immutable
  4. 4. The Problem Instances of Date are immutable Many methods involve complex calculations
  5. 5. The Problem Instances of Date are immutable Many methods involve complex calculations Caching of results is desirable
  6. 6. The Problem Instances of Date are immutable Many methods involve complex calculations Caching of results is desirable Want to keep the code clean and uncluttered with caching related code

×