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.
9 10 11 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 9 def desc @desc end |
#desc_const ⇒ Object
Returns the value of attribute desc_const.
9 10 11 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 9 def desc_const @desc_const end |
#fname ⇒ Object
Returns the value of attribute fname.
9 10 11 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 9 def fname @fname end |
#htags ⇒ Object (readonly)
Returns the value of attribute htags.
10 11 12 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 10 def @htags end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
10 11 12 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 10 def @tags end |
Instance Method Details
#add_htag(k, v) ⇒ Object
17 18 19 20 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 17 def add_htag(k, v) @htags ||= [] @htags << [k, v] end |
#add_tag(v) ⇒ Object
12 13 14 15 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 12 def add_tag(v) @tags ||= [] @tags << v end |
#remove_tag(tag) ⇒ Object
22 23 24 25 |
# File 'lib/test_prof/rspec_stamp/parser.rb', line 22 def remove_tag(tag) @tags&.delete(tag) @htags&.delete_if { |(k, _v)| k == tag } end |