Class: Jasmine::Headless::ReportMessage::Spec
- Inherits:
-
Object
- Object
- Jasmine::Headless::ReportMessage::Spec
- Defined in:
- lib/jasmine/headless/report_message/spec.rb
Instance Attribute Summary collapse
-
#file_info ⇒ Object
readonly
Returns the value of attribute file_info.
-
#statement ⇒ Object
readonly
Returns the value of attribute statement.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #filename ⇒ Object
-
#initialize(statement, file_info) ⇒ Spec
constructor
A new instance of Spec.
Constructor Details
#initialize(statement, file_info) ⇒ Spec
Returns a new instance of Spec.
13 14 15 |
# File 'lib/jasmine/headless/report_message/spec.rb', line 13 def initialize(statement, file_info) @statement, @file_info = statement, file_info end |
Instance Attribute Details
#file_info ⇒ Object (readonly)
Returns the value of attribute file_info.
11 12 13 |
# File 'lib/jasmine/headless/report_message/spec.rb', line 11 def file_info @file_info end |
#statement ⇒ Object (readonly)
Returns the value of attribute statement.
11 12 13 |
# File 'lib/jasmine/headless/report_message/spec.rb', line 11 def statement @statement end |
Class Method Details
.new_from_parts(parts) ⇒ Object
4 5 6 7 8 |
# File 'lib/jasmine/headless/report_message/spec.rb', line 4 def new_from_parts(parts) file_info = parts.pop new(parts.join(' '), file_info) end |
Instance Method Details
#==(other) ⇒ Object
17 18 19 |
# File 'lib/jasmine/headless/report_message/spec.rb', line 17 def ==(other) self.statement == other.statement && self.file_info == other.file_info end |
#filename ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/jasmine/headless/report_message/spec.rb', line 21 def filename if name = file_info.split(":").first name else nil end end |