Skip to content

Commit 2f4f074

Browse files
agrbergclaude
andcommitted
Update star counts in examples and README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7911a7b commit 2f4f074

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ end
8282
> a = GitHubApiAdapter.new
8383
> a.star_count
8484
Fetching data from GitHub
85-
=> 19
85+
=> 58
8686
> a.star_count
87-
=> 19
87+
=> 58
8888
8989
# Notice that "Fetching data from GitHub" was not output the 2nd time the method was invoked.
9090
# The network call and result parsing would also not be performed again.
@@ -102,12 +102,12 @@ The cache can intentionally be skipped by appending `_without_cache` to the meth
102102
> a = GitHubApiAdapter.new
103103
> a.star_count
104104
Fetching data from GitHub
105-
=> 19
105+
=> 58
106106
> a.star_count_without_cache
107107
Fetching data from GitHub
108-
=> 19
108+
=> 58
109109
> a.star_count
110-
=> 19
110+
=> 58
111111
```
112112

113113
#### Remove the Value via `clear_#{method}_cache`
@@ -118,15 +118,15 @@ The cached value can be cleared at any time by calling `clear_#{your_method_name
118118
> a = GitHubApiAdapter.new
119119
> a.star_count
120120
Fetching data from GitHub
121-
=> 19
121+
=> 58
122122
> a.star_count
123-
=> 19
123+
=> 58
124124
125125
> a.clear_star_count_cache
126126
=> true
127127
> a.star_count
128128
Fetching data from GitHub
129-
=> 19
129+
=> 58
130130
```
131131

132132
## Additional Configuration
@@ -323,15 +323,15 @@ end
323323
```irb
324324
> GitHubApiAdapter.star_count_for_cacheable
325325
Fetching data from GitHub for cacheable
326-
=> 19
326+
=> 58
327327
> GitHubApiAdapter.star_count_for_cacheable
328-
=> 19
328+
=> 58
329329
330330
> GitHubApiAdapter.star_count_for_tokenautocomplete
331331
Fetching data from GitHub for tokenautocomplete
332-
=> 1164
332+
=> 1309
333333
> GitHubApiAdapter.star_count_for_tokenautocomplete
334-
=> 1164
334+
=> 1309
335335
```
336336

337337
### Other Notes / Frequently Asked Questions

examples/class_method_example.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ def self.star_count_for_tokenautocomplete
2929

3030
GitHubApiAdapter.star_count_for_cacheable
3131
# Fetching data from GitHub for cacheable
32-
# => 19
32+
# => 58
3333
GitHubApiAdapter.star_count_for_cacheable
34-
# => 19
34+
# => 58
3535

3636
GitHubApiAdapter.star_count_for_tokenautocomplete
3737
# Fetching data from GitHub for tokenautocomplete
38-
# => 1164
38+
# => 1309
3939
GitHubApiAdapter.star_count_for_tokenautocomplete
40-
# => 1164
40+
# => 1309

examples/simple_example.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ def star_count
1818
a = GitHubApiAdapter.new
1919
a.star_count
2020
# Fetching data from GitHub
21-
# => 19
21+
# => 58
2222
a.star_count
23-
# => 19
23+
# => 58
2424

2525
a.star_count_without_cache
2626
# Fetching data from GitHub
27-
# => 19
27+
# => 58
2828
a.star_count
29-
# => 19
29+
# => 58
3030

3131
a.clear_star_count_cache
3232
# => true
3333
a.star_count
3434
# Fetching data from GitHub
35-
# => 19
35+
# => 58

0 commit comments

Comments
 (0)