Class: ApiTester::Contract
- Inherits:
-
Object
- Object
- ApiTester::Contract
- Defined in:
- lib/api-tester/definition/contract.rb
Instance Attribute Summary collapse
-
#endpoints ⇒ Object
Returns the value of attribute endpoints.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #add_endpoint(endpoint) ⇒ Object
-
#initialize(name) ⇒ Contract
constructor
A new instance of Contract.
Constructor Details
#initialize(name) ⇒ Contract
Returns a new instance of Contract.
6 7 8 9 |
# File 'lib/api-tester/definition/contract.rb', line 6 def initialize name self.name = name self.endpoints = [] end |
Instance Attribute Details
#endpoints ⇒ Object
Returns the value of attribute endpoints.
4 5 6 |
# File 'lib/api-tester/definition/contract.rb', line 4 def endpoints @endpoints end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/api-tester/definition/contract.rb', line 3 def name @name end |
Instance Method Details
#add_endpoint(endpoint) ⇒ Object
11 12 13 |
# File 'lib/api-tester/definition/contract.rb', line 11 def add_endpoint endpoint self.endpoints << endpoint end |