Class: TestProf::RSpecStamp::Parser::Result
- Inherits:
-
Object
- Object
- TestProf::RSpecStamp::Parser::Result
- Defined in:
- lib/test_prof/rspec_stamp/parser.rb
Overview
Contains the result of parsing
Instance Attribute Summary collapse
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#desc_const ⇒ Object
Returns the value of attribute desc_const.
-
#fname ⇒ Object
Returns the value of attribute fname.
-
#htags ⇒ Object
readonly
Returns the value of attribute htags.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
Instance Attribute Details
#desc ⇒ Object
Returns the value of attribute desc.
11 12 13 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 11 def desc @desc end |
#desc_const ⇒ Object
Returns the value of attribute desc_const.
11 12 13 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 11 def desc_const @desc_const end |
#fname ⇒ Object
Returns the value of attribute fname.
11 12 13 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 11 def fname @fname end |
#htags ⇒ Object (readonly)
Returns the value of attribute htags.
12 13 14 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 12 def @htags end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
12 13 14 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 12 def @tags end |
Instance Method Details
#add_htag(k, v) ⇒ Object
19 20 21 22 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 19 def add_htag(k, v) @htags ||= [] @htags << [k, v] end |
#add_tag(v) ⇒ Object
14 15 16 17 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 14 def add_tag(v) @tags ||= [] @tags << v end |
#remove_tag(tag) ⇒ Object
24 25 26 27 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 24 def remove_tag(tag) @tags&.delete(tag) @htags&.delete_if { |(k, _v)| k == tag } end |