travis-ci
1094 of 2027 relevant lines covered (53.97%)
0.54 hits per line
1 |
# frozen_string_literal: true
|
|
2 |
|
|
3 |
module Page |
1✔ |
4 |
class Post |
1✔ |
5 |
def initialize(post:) |
1✔ |
6 |
@post = post
|
× |
7 |
end
|
|
8 |
|
|
9 |
def title |
1✔ |
10 |
post.title |
× |
11 |
end
|
|
12 |
|
|
13 |
def date |
1✔ |
14 |
post.date.strftime('%B %-d, %Y')
|
× |
15 |
end
|
|
16 |
|
|
17 |
def body |
1✔ |
18 |
post.body |
× |
19 |
end
|
|
20 |
|
|
21 |
private |
1✔ |
22 |
|
|
23 |
attr_reader :post
|
1✔ |
24 |
end
|
|
25 |
end
|