Class: Jasmine::Headless::ReportMessage::Total
- Inherits:
-
Object
- Object
- Jasmine::Headless::ReportMessage::Total
- Defined in:
- lib/jasmine/headless/report_message/total.rb
Instance Attribute Summary collapse
-
#failed ⇒ Object
readonly
Returns the value of attribute failed.
-
#has_js_error ⇒ Object
readonly
Returns the value of attribute has_js_error.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(total, failed, time, has_js_error) ⇒ Total
constructor
A new instance of Total.
Constructor Details
#initialize(total, failed, time, has_js_error) ⇒ Total
Returns a new instance of Total.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jasmine/headless/report_message/total.rb', line 11 def initialize(total, failed, time, has_js_error) @total, @failed, @time = total.to_i, failed.to_i, time.to_f @has_js_error = case has_js_error when String has_js_error == "T" else has_js_error end end |
Instance Attribute Details
#failed ⇒ Object (readonly)
Returns the value of attribute failed.
9 10 11 |
# File 'lib/jasmine/headless/report_message/total.rb', line 9 def failed @failed end |
#has_js_error ⇒ Object (readonly)
Returns the value of attribute has_js_error.
9 10 11 |
# File 'lib/jasmine/headless/report_message/total.rb', line 9 def has_js_error @has_js_error end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
9 10 11 |
# File 'lib/jasmine/headless/report_message/total.rb', line 9 def time @time end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
9 10 11 |
# File 'lib/jasmine/headless/report_message/total.rb', line 9 def total @total end |
Class Method Details
.new_from_parts(parts) ⇒ Object
4 5 6 |
# File 'lib/jasmine/headless/report_message/total.rb', line 4 def new_from_parts(parts) new(*parts) end |
Instance Method Details
#==(other) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/jasmine/headless/report_message/total.rb', line 22 def ==(other) other && self.total == other.total && self.failed == other.failed && self.time == other.time && self.has_js_error == other.has_js_error end |