Class: Endpoint
- Inherits:
-
Object
- Object
- Endpoint
- Defined in:
- lib/tester/definition/endpoint.rb
Instance Attribute Summary collapse
-
#bad_request_response ⇒ Object
Returns the value of attribute bad_request_response.
-
#methods ⇒ Object
Returns the value of attribute methods.
-
#name ⇒ Object
Returns the value of attribute name.
-
#not_allowed_response ⇒ Object
Returns the value of attribute not_allowed_response.
-
#not_found_response ⇒ Object
Returns the value of attribute not_found_response.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #add_method(new_method) ⇒ Object
-
#initialize(name, url) ⇒ Endpoint
constructor
A new instance of Endpoint.
Constructor Details
#initialize(name, url) ⇒ Endpoint
Returns a new instance of Endpoint.
11 12 13 14 15 16 17 18 |
# File 'lib/tester/definition/endpoint.rb', line 11 def initialize name, url self.url = url self.name = name self.methods = [] self.bad_request_response = Response.new 400 self.not_allowed_response = Response.new 415 self.not_found_response = Response.new 404 end |
Instance Attribute Details
#bad_request_response ⇒ Object
Returns the value of attribute bad_request_response.
7 8 9 |
# File 'lib/tester/definition/endpoint.rb', line 7 def bad_request_response @bad_request_response end |
#methods ⇒ Object
Returns the value of attribute methods.
5 6 7 |
# File 'lib/tester/definition/endpoint.rb', line 5 def methods @methods end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/tester/definition/endpoint.rb', line 6 def name @name end |
#not_allowed_response ⇒ Object
Returns the value of attribute not_allowed_response.
8 9 10 |
# File 'lib/tester/definition/endpoint.rb', line 8 def not_allowed_response @not_allowed_response end |
#not_found_response ⇒ Object
Returns the value of attribute not_found_response.
9 10 11 |
# File 'lib/tester/definition/endpoint.rb', line 9 def not_found_response @not_found_response end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/tester/definition/endpoint.rb', line 4 def url @url end |
Instance Method Details
#add_method(new_method) ⇒ Object
20 21 22 23 |
# File 'lib/tester/definition/endpoint.rb', line 20 def add_method(new_method) self.methods << new_method self end |