Class: TestBalancer::Test
- Inherits:
-
Object
- Object
- TestBalancer::Test
- Defined in:
- lib/test_balancer/test.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#execution_time ⇒ Object
Returns the value of attribute execution_time.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, line = nil, execution_time = 0) ⇒ Test
constructor
A new instance of Test.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(path, line = nil, execution_time = 0) ⇒ Test
Returns a new instance of Test.
6 7 8 9 10 |
# File 'lib/test_balancer/test.rb', line 6 def initialize path, line=nil, execution_time=0 @path = Pathname.new(path) @line = line @execution_time = execution_time end |
Instance Attribute Details
#execution_time ⇒ Object
Returns the value of attribute execution_time.
4 5 6 |
# File 'lib/test_balancer/test.rb', line 4 def execution_time @execution_time end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
3 4 5 |
# File 'lib/test_balancer/test.rb', line 3 def line @line end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/test_balancer/test.rb', line 3 def path @path end |
Instance Method Details
#inspect ⇒ Object
12 13 14 |
# File 'lib/test_balancer/test.rb', line 12 def inspect "<#{self.class.name} #{to_s} #{execution_time}s>" end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/test_balancer/test.rb', line 16 def to_s line.nil? ? path.to_s : "#{path}:#{line}" end |