travis-ci
27 of 27 new or added lines in 7 files covered. (100.0%)
4797 of 5242 relevant lines covered (91.51%)
1111.42 hits per line
1 |
# encoding: utf-8
|
|
2 |
|
|
3 |
module Train::Platforms |
3✔ |
4 |
class Family |
3✔ |
5 |
include Train::Platforms::Common |
3✔ |
6 |
attr_accessor :children, :condition, :families, :name |
3✔ |
7 |
|
|
8 |
def initialize(name, condition) |
3✔ |
9 |
@name = name
|
39,786✔ |
10 |
@condition = condition
|
39,786✔ |
11 |
@families = {}
|
39,786✔ |
12 |
@children = {}
|
39,786✔ |
13 |
@detect = nil |
39,786✔ |
14 |
@title = "#{name.to_s.capitalize} Family" |
39,786✔ |
15 |
|
|
16 |
# add itself to the families list
|
|
17 |
Train::Platforms.families[@name.to_s] = self |
39,786✔ |
18 |
end
|
|
19 |
|
|
20 |
def title(title = nil) |
3✔ |
21 |
return @title if title.nil? |
18,444✔ |
22 |
|
|
23 |
@title = title
|
18,435✔ |
24 |
self
|
18,435✔ |
25 |
end
|
|
26 |
|
|
|
def inspect |
3✔ |
|
where = caller.first.split(/:/, 3).first(2).join(":") |
× |
|
"%p[%s]" % [self.class, name] |
× |
30 |
end
|
|
31 |
end
|
|
32 |
end
|