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.
7 8 9 10 11 12 13 |
# File 'lib/testrail/test_section.rb', line 7 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.
5 6 7 |
# File 'lib/testrail/test_section.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/testrail/test_section.rb', line 5 def name @name end |
Instance Method Details
#get_or_create_test_case(name) ⇒ Object
15 16 17 |
# File 'lib/testrail/test_section.rb', line 15 def get_or_create_test_case(name) @test_suite.get_or_create_test_case(section_id: @id, name: name) end |