Class: Piggly::Tags::EvaluationTag
Constant Summary
Constants inherited
from AbstractTag
AbstractTag::PATTERN
Instance Attribute Summary collapse
Attributes inherited from AbstractTag
#id
Instance Method Summary
collapse
Methods inherited from AbstractTag
#tap
Constructor Details
Returns a new instance of EvaluationTag.
34
35
36
37
|
# File 'lib/piggly/tags.rb', line 34
def initialize(*args)
clear
super
end
|
Instance Attribute Details
Returns the value of attribute ran.
32
33
34
|
# File 'lib/piggly/tags.rb', line 32
def ran
@ran
end
|
Instance Method Details
#==(other) ⇒ Object
68
69
70
|
# File 'lib/piggly/tags.rb', line 68
def ==(other)
@id == other.id and @ran == other.ran
end
|
64
65
66
|
# File 'lib/piggly/tags.rb', line 64
def clear
@ran = false
end
|
#complete? ⇒ Boolean
55
56
57
|
# File 'lib/piggly/tags.rb', line 55
def complete?
@ran
end
|
#description ⇒ Object
59
60
61
|
# File 'lib/piggly/tags.rb', line 59
def description
@ran ? "full coverage" : "never evaluated"
end
|
#ping(value) ⇒ Object
43
44
45
|
# File 'lib/piggly/tags.rb', line 43
def ping(value)
@ran = true
end
|
47
48
49
|
# File 'lib/piggly/tags.rb', line 47
def style
"c#{@ran ? "1" : "0"}"
end
|
51
52
53
|
# File 'lib/piggly/tags.rb', line 51
def to_f
@ran ? 100.0 : 0.0
end
|
39
40
41
|
# File 'lib/piggly/tags.rb', line 39
def type
:block
end
|