travis-ci
394 of 394 new or added lines in 14 files covered. (100.0%)
11674 of 42859 relevant lines covered (27.24%)
6783.15 hits per line
1 |
module Ekylibre |
2✔ |
2 |
module Navigation |
2✔ |
3 |
class Page |
2✔ |
4 |
attr_reader :controller, :action, :path |
2✔ |
5 |
|
|
6 |
def initialize(to) |
2✔ |
7 |
@path = to
|
2,390✔ |
8 |
@controller, @action = @path.split('#')[0..1] |
2,390✔ |
9 |
end
|
|
10 |
|
|
11 |
def to_hash |
2✔ |
12 |
{ controller: '/' + @controller, action: @action } |
× |
13 |
end
|
|
14 |
|
|
15 |
def ==(other) |
2✔ |
16 |
@path == other.path
|
828,700✔ |
17 |
end
|
|
18 |
|
|
19 |
def human_name |
2✔ |
20 |
"actions.#{@controller}.#{@action}".t
|
× |
21 |
end
|
|
22 |
end
|
|
23 |
end
|
|
24 |
end
|