Class: TestRail::TestSection
- Inherits:
-
Object
- Object
- TestRail::TestSection
- Defined in:
- lib/testrail/test_section.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #get_or_create_test_case(name) ⇒ Object
-
#initialize(id:, name:, test_suite:) ⇒ TestSection
constructor
A new instance of TestSection.
Constructor Details
#initialize(id:, name:, test_suite:) ⇒ TestSection
Returns a new instance of TestSection.
21 22 23 24 25 26 27 |
# File 'lib/testrail/test_section.rb', line 21 def initialize(id:, name:, test_suite:) raise(ArgumentError, 'section id nil') if id.nil? raise(ArgumentError, 'section name nil') if name.nil? @id = id @name = name @test_suite = test_suite end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
19 20 21 |
# File 'lib/testrail/test_section.rb', line 19 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/testrail/test_section.rb', line 19 def name @name end |
Instance Method Details
#get_or_create_test_case(name) ⇒ Object
29 30 31 |
# File 'lib/testrail/test_section.rb', line 29 def get_or_create_test_case(name) @test_suite.get_or_create_test_case(section_id: @id, name: name) end |