Class: Diggit::RunnableEntry
- Inherits:
-
Object
- Object
- Diggit::RunnableEntry
- Includes:
- EntryWithError
- Defined in:
- lib/dgit/entries.rb
Instance Attribute Summary collapse
-
#end ⇒ Object
Returns the value of attribute end.
-
#name ⇒ Object
Returns the value of attribute name.
-
#start ⇒ Object
Returns the value of attribute start.
Attributes included from EntryWithError
Instance Method Summary collapse
- #duration ⇒ Object
- #error? ⇒ Boolean
-
#initialize(runnable) ⇒ RunnableEntry
constructor
A new instance of RunnableEntry.
- #tic ⇒ Object
- #toc ⇒ Object
Constructor Details
#initialize(runnable) ⇒ RunnableEntry
Returns a new instance of RunnableEntry.
96 97 98 99 100 |
# File 'lib/dgit/entries.rb', line 96 def initialize(runnable) @name = runnable.name @end = nil tic end |
Instance Attribute Details
#end ⇒ Object
Returns the value of attribute end.
94 95 96 |
# File 'lib/dgit/entries.rb', line 94 def end @end end |
#name ⇒ Object
Returns the value of attribute name.
94 95 96 |
# File 'lib/dgit/entries.rb', line 94 def name @name end |
#start ⇒ Object
Returns the value of attribute start.
94 95 96 |
# File 'lib/dgit/entries.rb', line 94 def start @start end |
Instance Method Details
#duration ⇒ Object
114 115 116 |
# File 'lib/dgit/entries.rb', line 114 def duration @end - @start end |
#error? ⇒ Boolean
102 103 104 |
# File 'lib/dgit/entries.rb', line 102 def error? !@error.nil? end |
#tic ⇒ Object
106 107 108 |
# File 'lib/dgit/entries.rb', line 106 def tic @start = Time.now end |
#toc ⇒ Object
110 111 112 |
# File 'lib/dgit/entries.rb', line 110 def toc @end = Time.now end |