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.



9
10
11
# File 'lib/test_prof/rspec_stamp/parser.rb', line 9

def desc
  @desc
end

#desc_constObject

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

#fnameObject

Returns the value of attribute fname.



9
10
11
# File 'lib/test_prof/rspec_stamp/parser.rb', line 9

def fname
  @fname
end

#htagsObject (readonly)

Returns the value of attribute htags.



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

def htags
  @htags
end

#tagsObject (readonly)

Returns the value of attribute tags.



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

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