Class: TestProf::RSpecStamp::Parser::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/test_prof/rspec_stamp/parser.rb

Overview

Contains the result of parsing

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descObject

Returns the value of attribute desc.



11
12
13
# File 'lib/test_prof/rspec_stamp/parser.rb', line 11

def desc
  @desc
end

#desc_constObject

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

#fnameObject

Returns the value of attribute fname.



11
12
13
# File 'lib/test_prof/rspec_stamp/parser.rb', line 11

def fname
  @fname
end

#htagsObject (readonly)

Returns the value of attribute htags.



12
13
14
# File 'lib/test_prof/rspec_stamp/parser.rb', line 12

def htags
  @htags
end

#tagsObject (readonly)

Returns the value of attribute tags.



12
13
14
# File 'lib/test_prof/rspec_stamp/parser.rb', line 12

def tags
  @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